My first Squeak :) - Morphic-Demo WorldBouncer
Bob Arning
arning at charm.net
Mon Jan 20 14:41:09 CET 2003
bokel,
On Mon, 20 Jan 2003 11:09:44 +0100 "Ralf Bokelberg" =
<squeak at bokelberg.de> wrote:
>when i would like to investigate
>when and where the owner is set,=20
>how can i afford that ?=20
>
>tia
>bokel
>
>
>"Bob Arning" wrote
>>That's because #initialize is called very=20
>>shortly after the object is created, before=20
>>it is actually added to a owner morph.
With a browser pointing at your morph class, pop up the menu on the =
pane listing the classes and choose "inst var defs". From the menu that =
appears, select "owner" and you will get a browser on those methods =
that store a new value into owner. Several of these are #initialize =
variants that set it to nil (just in case ;-). Several are related to =
deleting, but one, #privateOwner:, looks like a good candidate. Check =
the senders of #privateOwner: and you will see several methods in Morph =
that are involved in adding morphs to other morphs. These are the ones =
you are interested in.
On Mon, 20 Jan 2003 10:33:24 +0100 "Ralf Bokelberg" =
<squeak at bokelberg.de> wrote:
>it would be nice to have a message sent
>to me "after" my owner has been set. Do
>you know if there already is something like=20
>this ?=20
There isn't one precisely for that, but #ownerChanged will be sent to a =
morph when a new layout may be needed due to some change in the owner. =
You could probably do what you need at this point.
Cheers,
Bob
More information about the Squeak-dev
mailing list
|