On Sunday 01 April 2001 18:28, Raymond Tiefenthal wrote:
I try to explain my question: Given, I have 2 simple morphs from class Morph, which where created non programatically, by dragging out of a parts bin, for example. How can I refer to them and how can 1 refer to the other? I could open an inspector on the morph to assign it to a global var (like A_self), then I would open an inpector on the other morph (like A addMorphBack: self).
You can tell a Workspace "start accepting dropped Morphs for reference". When you drop a Morph on a Workspace with this enabled, the Morph will be added to the bindings of the Workspace, and its name will be added to the text of the Workspace.
If you do this with both of your Morphs, you can then work with them in a Workspace.
There is also the scripting support.
Another way could be using the internal names, but I think that would involve more typing. I'm interested in a way to do it by morphic's rules and philosophy. Another example: I want a MenuMorph, which shall set it's item's target's to any other morph.
MenuItemMorphs have a control menu item called set target. I don't know how it works, though. I've never been able to get it to work for me.
I would have to create a subclass with special behaviour.
I don't understand.
squeak-dev@lists.squeakfoundation.org