Morphs & Models question

Ned Konz ned at bike-nomad.com
Fri Oct 12 03:16:59 UTC 2001


On Thursday 11 October 2001 05:15 am, Kevin Fisher wrote:
> Hi:
>
> Something occurred to me the other night while I was reading the "white
> book" section on models.
>
> As things are right now, if you have a Model that displays a Morph of some
> kind, the "proper" way to notify the Model about the deletion of the Morph
> is to have the Morph send windowIsClosing to the Model.

What kind of Morph are you talking about? Are you just referring to 
subclasses of MorphicModel? Outside of these, there is no explicit connection 
between a separate model object and a Morph, so you could do things any way 
you wanted.

> Is it unreasonable to think that this could be done better with the
> dependency mechanism instead?  

There are a number of calls to the model that expect a return value, so a 
pure notification wouldn't work in all cases. In this one case (deleting the 
Morph) it could work.

-- 
Ned Konz
currently: Stanwood, WA
email:     ned at bike-nomad.com
homepage:  http://bike-nomad.com




More information about the Squeak-dev mailing list