Still trying to kill that pesky morph......

John Hinsley jhinsley at telinco.co.uk
Mon Oct 22 04:34:52 UTC 2001


Andreas Raab wrote:
> 
> John,
> 
> > I think what I was missing was that WorldTimeMorph (at least, the
> > initializeLocally part of it) is all class side and thus won't behave
> > like "normal" morphs in this respect.
> 
> No, no, no. I would be _very_ surprised if #initializeLocally would not
> return the instance it just created. If it does, you can remember it (e.g.,
> just assign it to some variable). If it does not - then it needs to be
> fixed. A class method that creates an instance should almost always return
> the instance it created (what's the point in return values otherwise?).


Well, I can only speak as regards what happens (I'm not up to speed on
theory and am always ready to be corrected!):

WorldTimeMorph initializeLocally (creates a wtm)

WorldTimeMorph delete (brings up the debugger -- MessageNotUnderstood:
delete).

Turning Ned's code into a method "kill" deletes it.

But here it is, if you want to take a peek. Note that the morph is
Karl's work. I just did a (literally) one word debugging exercise on the
initializeLocally method to get it to run (that method was kindly put
together by Karl just so I could bring it up without using a port which
I envisaged using for something else with the Rolodex) and popped Ned's
code in as a kill method.

Cheers

John
-- 
If you don't care about your data, like file systems which automagically
destroy themselves and have money to burn on 3rd party tools to keep
your
system staggering on, Microsoft (tm) have the Operating System for you.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: WorldTimeMorph.st.gz
Type: application/x-gzip
Size: 1103 bytes
Desc: not available
Url : http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20011022/237e6350/WorldTimeMorph.st.bin


More information about the Squeak-dev mailing list