[squeak-dev] High-level docs for ToolBuilder?

Marcel Taeumel marcel.taeumel at hpi.de
Mon May 7 08:27:32 UTC 2018


Hi Daniel,

take a look at ObjectExplorer >> #buildWith:. 

Then take a look at the hierarchy of PluggableWidgetSpec, which maps to what you can find in ToolBuilder category "defaults". Try to understand the change/update observer pattern, which governs the communication between (pluggable) widgets and the model(s). Most tools in Squeak form a "fat model", which means that all widgets call back into one model object (i.e. Browser, Debugger, Workspace, ...).

Say, you want to add several buttons?

1) You need a visual container such as PluggableWindowSpec or PluggablePanelSpec (or "builder pluggablePanelSpec new").
2) You configure your button spec as needed (see PluggableButtonSpec).
3) You add this spec to the container via "panelSpec children add: buttonSpec".
4) You build the whole thing via "builder build: mySpec".

Again, take a look at ObjectExplorer >> #buildWith: and how ObjectExplorer implements the call backs. :-)

Best,
Marcel

Am 07.05.2018 10:03:37 schrieb Daniel Passaro <danpassaro at gmail.com>:
I'm trying to build a pet GUI project in Squeak but I'm finding it very confusing to trace through the code that actually builds, for example, a Workspace or SystemBrowser.  Is there an up-to-date, high-level overview of how ToolBuilder works and the intended/best-practice way of creating an actual application with it?

I am also a Squeak and Smalltalk newbie so if ToolBuilder only makes sense if, say, you're familiar with MVC, please let me know as ToolBuilder is the first framework I've tried to use in Squeak.

For the record, I have skimmed some of the other Morphic tutorials but they seem to generally involve custom widgets that don't scale with the parent window.  I want to create a plain-Jane business-y GUI with scrollbars and expandable windwos, but most of the tutorials I found seemed geared towards more playful and exploratory projects (laser games and bouncing balls and etc).
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20180507/19354550/attachment.html>


More information about the Squeak-dev mailing list