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

John Hinsley jhinsley at telinco.co.uk
Mon Oct 22 00:30:05 UTC 2001


Ned Konz wrote:

> 
> What is the code you're using to construct the WTM? If it's something like:
> 
> WorldTimeMorph new openInWorld

Actually it doesn't use new:

WorldTimeMorph initializeLocally

> 
> then you can just go:
> 
> wtm _ WorldTimeMorph new openInWorld.
> "and later"
> wtm delete.

Which is, I guess, why delete doesn't work. (The whole method is class
side.)
But........

> 
> Or to delete all WorldTimeMorphs from the current world:
> 
> World allMorphsDo: [ :ea | (ea isKindOf: WorldTimeMorph) ifTrue: [ ea delete
> ]]

This line works a treat! Looking at it, I can see why it works, but I'd
never have thought of it, not in a million years!

Many thanks again, Ned! 

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.




More information about the Squeak-dev mailing list