Still trying to kill that pesky morph......
ned at bike-nomad.com
Sun Oct 21 05:43:21 UTC 2001
On Saturday 20 October 2001 09:07 pm, John Hinsley wrote:
> The problem is that in an interface, you can't really have people
> dragging morphs around. And I don't want people to have to click on the
> X to delete the morph. I need to be able to put together some code which
> will enable the morph to be zapped.
Which morph? Where did it come from? If the user made it, then shouldn't the
user be responsible for getting rid of it? If your code made it, why can't
you remember that fact and call delete on it later?
If you can tell which morph it is (perhaps via a property), you can just
traverse the World's submorphs to find it, then kill it.
> In short, I need a getter (at least) and (preferably) setter for that
> "textual reference". And after a day of messing around, all I can come
> up with is identityHash which returns a number, but the wrong one (for
> the morph, at least!). Aaargh!!!!
I don't get it. Do you have people routinely dropping Morphs on workspaces?
The workspace itself holds onto those bindings, and can be told to forget
> Any ideas welcomed: I'd have thought this would be easy, but it seems to
> be neither easy nor documented!
What are you trying to do?
How is the Morph being made? Whatever makes it could remember it for later
What does it mean in your UI to make and delete Morphs?
currently: Stanwood, WA
email: ned at bike-nomad.com
More information about the Squeak-dev