[squeak-dev] use of ToolBuilder default

Bob Arning arning315 at comcast.net
Wed Sep 11 12:54:13 UTC 2013

I got into the state where I could not open a FileList and tracked it 
down to the ToolBuilder default having retained some state from an 
earlier error building a new widget. In particular, the <parent> ivar 
was still pointing to some previous SystemWindow and gthat caused error 
when trying to create the buttons on the FileList.

In ToolBuilder, one could add an ensure: to see that parent always gets 

buildAll: aList in: newParent
     "Build the given set of widgets in the new parent"
     | prior |
     aList ifNil:[^self].
     prior := parent.
         parent := newParent.
         aList do:[:each| each buildWith: self].
     ] ensure: ["<<<<"
         parent := prior.

but I guess a better question is why Toolbuilder default doesn't 
automatically return a clean builder?

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20130911/a1d7e612/attachment.htm

More information about the Squeak-dev mailing list