[Newbies] [4.1] How do I use ToolBuilder to construct a three pane browser?

Hannes Hirzel hannes.hirzel at gmail.com
Mon Apr 19 09:45:34 UTC 2010


Hello

I would like to construct a three pane browser to inspect a dictionary
of dictionaries (see data structure example code below). How do I do
this using the ToolBuilder? I would like to learn to use it.

The class comment of ToolBuilder
"I am a tool builder, that is an object which knows how to create
concrete widgets from abstract specifications. Those specifications
are used by tools which want to be able to function in diverse user
interface paradigms, such as MVC, Morphic, Tweak, wxWidgets etc"

What I have done so far it to construct a two pane browser for
browsing a dictionary showing only the keys not the instance
variables. I did this by subclassing DictionaryInspector and
overriding 4 methods. (see screen shot)

I assume for the Three pane browser I'd have to construct a three pane
browser from scratch using ToolBuilder.

myLessons := Dictionary new.

myLessons at: 'lesson1' put: ((((Dictionary new
	at: 'section1' put: 'the string for section 1 of lesson01'; yourself)
	at: 'section2' put: 'the string for section 2 of lesson01';  yourself)
	at: 'section3' put: 'the string for section 3 of lesson01'; yourself)).
	
myLessons at: 'lesson2' put: (((((Dictionary new
	at: 'section1' put: 'the string for section 1 of lesson2'; yourself)
	at: 'section2' put: 'the string for section 2 of lesson2';  yourself)
	at: 'section3' put: 'the string for section 3 of lesson2'; yourself))
	at: 'section4' put: 'the string for section 4 of lesson2'; yourself).
	
myLessons at: 'lesson3' put: ((((Dictionary new
	at: 'section1' put: 'the string for section 1 of lesson3'; yourself)
	at: 'section2' put: 'the string for section 2 of lesson3';  yourself)
	at: 'section3' put: 'the string for section 3 of lesson3'; yourself)).
	
myLessons explore

Thank you for suggestions/hints or maybe just the answer in advance.
For me this is an example for constructing more complex things.

Hannes
-------------- next part --------------
A non-text attachment was scrubbed...
Name: TwoPaneDictionaryBrowser.png
Type: image/png
Size: 39379 bytes
Desc: not available
Url : http://lists.squeakfoundation.org/pipermail/beginners/attachments/20100419/1a5155ad/TwoPaneDictionaryBrowser-0001.png


More information about the Beginners mailing list