From: Pharo-users [mailto:pharo-users-bounces@lists.pharo.org] On Behalf Of Esteban A. Maringolo Sent: Tuesday, March 8, 2016 9:03 PM To: Any question about pharo is welcome <pharo-users@lists.pharo.org> Subject: Re: [Pharo-users] View a class with inherited variables/methods
Hi Henrik,
2016-03-08 16:57 GMT-03:00 Henrik Nergaard <henrik.nergaard@uia.no>:
#withAllSubclasses
TextMorphForFieldView withAllSuperclasses reversed collect: [ :cls | cls -> {cls instVarNames . cls methods }].
I was doing something similar like: MyClass withAllSuperclasses reversed flatCollect: [ :cls | cls instVarNames ].
But I was asking if there was a tool that already provides that.
Ah, so Something like this then? ---------------------------------------------------------------------- | classToView browser list nav | classToView := TextMorphForFieldView. nav := SystemNavigation new browsedEnvironment: RBBrowserEnvironment new; yourself. browser := MessageBrowser new title: 'aTitle'; autoSelect: classToView name; messages: #(); yourself. list := FTEasyListMorph new hResizing: #spaceFill; vResizing: #spaceFill; elements: (classToView withAllSuperclasses reversed flatCollect: [ :cls | cls instVarNames ]); beSingleSelection; yourself. list onAnnouncement: FTSelectionChanged do: [ :ann | | ivar | ivar := [ list dataSource elementAt: ann newSelectedRowIndexes anyOne ] ifError: [ nil ]. ivar ifNotNil: [ browser messages: (nav allAccessesTo: ivar from: classToView ) ] ]. (AlignmentMorph new setAsRow; addMorph: browser buildWithSpec; addMorph: list; layoutChanged; fullBounds; openInWindowLabeled: 'Stuff') position: 20@20; extent: 900@620. --------------------------------------------------------------- Best regards, Henrik
Thank you!
Esteban A. Maringolo