<html>
<body>
<font size=3>Karl, Ned,<br>
Many thanks for your suggestions. The following executed in a workspace
demonstrates the problem:<br><br>
<i>symbol := Morph
new.
" create "<br>
symbol
openInHand.
" place "<br>
(ActiveWorld submorphs includes: symbol) ifFalse: [self
error]. " Use. "<br><br>
</i>This test fails. But the last statement does not fail if I select and
<i>doIt </i>after having placed the new morph.<br><br>
The problem is clearly non-trivial. <br><br>
I have tried waiting after the openInHand:<br>
<i> ActiveWorld
doOneCycle.
" try to wait - 1. "<br>
ActiveWorld
doOneCycleNow.
" try to wait - 2. "<br>
ActiveWorld runLocalStepMethods.
" try to wait - 3. "<br>
</i>No help there.<br><br>
I have tried<br>
<i>symbol := Morph
new.
" create "<br>
symbol
openInHand.
" place "<br>
WorldState addDeferredUIMessage: <br>
<x-tab> </x-tab>[(ActiveWorld
submorphs includes: symbol) " use "<br>
ifFalse: [self error] ]<br>
</i>No change.<br><br>
I'm running Squeak3.6-5429-full. There is no <i>addedMorph:</i> method in
the whole system. (It is a feature of 3.7)<br><br>
<i>Morph>>intoWorld:</i> runs when owner is set, but the morph is
not yet positioned. So it runs before <i>openInHand </i>returns. A halt
shows that it is in the same thread as the triggering menu command and
<i>openInHand</i>. But the positioning is independent of this thread and
takes place while the halt debugger is open.<br><br>
Amazing.<br>
--Trygve<br><br>
<br>
<x-sigsep><p></x-sigsep>
-- <br><br>
Trygve Reenskaug mailto: trygver <at>
ifi.uio.no<br>
Morgedalsvn. 5A
<a href="http://heim.ifi.uio.no/~trygver" eudora="autourl">http://heim.ifi.uio.no/~trygver</a><br>
N-0378 Oslo
Tel: (+47) 22 49 57 27<br>
Norway<br>
</font></body>
<br>
</html>