One Page Browser

| 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.


And you get!

Screen Shot 2016-03-09 at 22.07.56.png



Advertisements

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: