How to destroy my morph properly ?

hjh-sqlist hjh-sqlist at lexdb.net
Tue Jan 11 17:48:03 UTC 2005


Could you please try using the explanations mentioned in the FAQ on this subject
and ask us more specifically on the things that are not explained enough there
or missing?

http://minnow.cc.gatech.edu/squeak/1584

Hannes


Quoting Joseph Frippiat <frippiat.j at kst.be>:

> Hello,
> 
> I created a new morph with several buttons to be used as the man machine
> interface.
> This morph use a file to log events and operator actions.
> 
> The morph is created with "new openInWorld"
> 
> How do I destroy my morph properly ?
> I know I can use the delete message, but how to tell my morph to log a last
> message and to close the log file before quitting ?

I would  superride the 'delete' message in your morph and write a note on the
log before calling
   super delete.


> I can also create a quit button and create a method to do the job, but in
> case of the operator use the pink Halo (move to trash) how to call a
> cleaning method automatically ?
> Looking around I found the "release" method.  Do I need to create one ?
> When is this method called ?
> I created a release method, but it isn't called when I use the pink halo.
> 
> I use Squeak 3.6 .
> 
> Thanks
> 
> Joseph
> 
> 
> 







More information about the Squeak-dev mailing list