Squeak
  links to this page:    
View this PageEdit this PageUploads to this PageHistory of this PageTop of the SwikiRecent ChangesSearch the SwikiHelp Guide
ToolBuilder
Last updated at 3:24 am UTC on 9 November 2017
The ToolBuilder is a framework started by Andreas Raab in 2005, has been included in Squeak since release 3.9 and is actively maintained. Its aim is to achieve cross-UI-framework (MVC, Morphic, Tweak) support for a limited number of widgets which are critical for various Squeak tools, including (but not limited to)



Squeak 6.0a Update Tools-tpr.769 implements changes to clean up the creation and construction of browsers.
All browsers can be made with

 ToolBuilder open: BrowserClassOfMyChoice


See also
UIManager








Repository


The development of ToolBuilder was done in http://squeaksource.com/ToolBuilder/ before the code was moved into the release image. ToolBuilder is included in the Squeak 3.9 release (2008) but parts of it were included in earlier development versions.


Archive


The following notes apply to Toolbuilder before it was moved into the image and are out of date.

This is a temporary place to upload some changes that cannot be attached to the Squeaksource.com wiki.

PopUpMenu Refactor





chooseSubjectPrefixForEmail
   | subjectIndex |
   subjectIndex := (PopUpMenu labels: 'Bug fix [FIX]\Enhancement [ENH]\Goodie [GOODIE]\Test suite [TEST]\None of the above (will not be archived)' withCRs)

   ^ #('[CS] ' '[FIX] ' '[ENH] ' '[GOODIE] ' '[TEST] ' '[CS] ' ) at: subjectIndex + 1


... being changed to
ChangeSet>>chooseSubjectPrefixForEmail
(emphasis added):



chooseSubjectPrefixForEmail
   | subjectIndex |
   subjectIndex := UIManager default 
           chooseFrom: #('Bug fix [FIX]' 'Enhancement [ENH]' 'Goodie [GOODIE]'
                         'Test suite [TEST]' 'None of the above (will not be archived)' )
                title: 'What type of change set\are you submitting to the list?' withCRs.

    ^ #('[CS] ' '[FIX] ' '[ENH] ' '[GOODIE] ' '[TEST] ' '[CS] ' ) at: subjectIndex + 1




Also, in some cases where there were strings and variables being catenated,
#()
won't work, so I used
Array with:with: ...
instead.


In cases where a Stream was created, the easiest and least intrusive thing seemed to be sending #substrings to as in the following.

Here is the original
ChangeList>>selectConflictsWith
(emphasis added):


selectConflictsWith
    "Selects all method definitions for which there is ALSO an entry
    in the specified changeSet or changList chosen by the user.
    4/11/96 tk"
    | aStream all index |
    aStream _ WriteStream on: (String new: 200).
    (all _ ChangeSorter allChangeSets copy) do:
        [:sel | aStream nextPutAll: (sel name contractTo: 40); cr].
    ChangeList allSubInstancesDo:
        [:sel | aStream nextPutAll: (sel file name); cr.
            all addLast: sel].
    aStream skip: -1.
    index _ (PopUpMenu labels: aStream contents) startUp.
    index > 0 ifTrue: [
        self selectConflicts: (all at: index)].


And here is my change (emphasis added):


selectConflictsWith
    "Selects all method definitions for which there is ALSO an entry
    in the specified changeSet or changList chosen by the user.
    4/11/96 tk"
    | aStream all index |
    aStream := WriteStream
                on: (String new: 200).
    (all := ChangeSorter allChangeSets copy)
        do: [:sel | aStream
                nextPutAll: (sel name contractTo: 40);
                cr].
    ChangeList
        allSubInstancesDo: [:sel | 
            aStream nextPutAll: sel file name;
                cr.
            all addLast: sel].
    aStream skip: -1.
    index := UIManager default chooseFrom: aStream contents substrings.
    index := (PopUpMenu labels: aStream contents) startUp.
    index > 0
        ifTrue: [self
                selectConflicts: (all at: index)]


ToolBuilder-UI-Refactor-PopUpMenu.cs

ToolBuilder-UI-Refactor-FillInTheBlank.cs

SMBase-rbb.mcz


UIManagerReplacePopUpMenu.cs (How do you get rid of uploaded files you don't need? ;-)