[BUG] SystemWindow>>delete, #release instead of #removeDependent:

Lex Spoon lex at cc.gatech.edu
Wed Jul 18 16:31:23 UTC 2001


Diego Gomez Deck <DiegoGomezDeck at ConsultAr.com> wrote:

> >Sounds good to me!  It would also seem good to put "self release" in the
> >default #windowIsClosing method....
> 
> If we put "self release" in windowIsClosing, we generate the same problem 
> that I tried to fix.
> 
> #windowIsClosing is called before each view get closed, so the other views 
> get 'broken'.
> 
> One view can't send #release to the model, only #removeDependent with "self".
> 

It works okay: if you want to have multiple windows, then you simply
need to override #windowIsClosing.  Thus, the #release is only a
default, where previously, there was no way to prevent  #release from
being called.

It's still going to be tough to deal with multiple windows being open on
the same model.  For models that only have memory resources, you can
just let them get garbage collected.  But if the model needs to release
external resources when the window closes (e.g., in the IRC client!),
then how do you know when to do the shutdown?  In the IRC client, only
one window has the IRCConnection as a model, for just this reason...


-Lex




More information about the Squeak-dev mailing list