[squeak-dev] use of ToolBuilder default

David T. Lewis lewis at mail.msen.com
Wed Sep 11 14:32:28 UTC 2013


The only practical reason that comes to mind is the case of entering
e.g. an MVCProject from a MorphicProject. There is a transition period
during which some things are being done in the project being entered,
and some things are being done to the project that you are leaving.
I can't say if this would lead to problems in practice (it would be
easy to try it but I can't do so at the moment).

Dave


On Wed, Sep 11, 2013 at 10:05:01AM -0400, Bob Arning wrote:
> It's fine that each UIManager has its own kind of ToolBuilder, but why 
> reuse a single instance over and over?
> 
> You have now:
> 
> UIManager>>toolBuilder
>     ^toolBuilder
> 
> MorphicUIManager>>initialize
>     toolBuilder := MorphicToolBuilder new
> 
> MVCUIManager>>initialize
>     toolBuilder := MVCToolBuilder new
> 
> so, why that rather than:
> 
> MorphicUIManager>>toolBuilder
>     ^ MorphicToolBuilder new
> 
> MVCUIManager>>toolBuilder
>     ^MVCToolBuilder new
> 
> ?
> 
> Cheers,
> Bob
> 
> On 9/11/13 9:33 AM, David T. Lewis wrote:
> >Good question. It was probably a matter of design style. Every Project has
> >a UIManager, and that UIManager has its own ToolBuilder instance. That has
> >a nice feel to it, and it makes the roles of these things seem more clear.
> >It also avoids the need to figure out what kind of ToolBuilder to create
> >each time time you use one (normally a trivial concern but possibly more
> >complicated when entering one kind of project from another).
> 

> 



More information about the Squeak-dev mailing list