How do I wait for HandMorph>>openInHand to complete?

Karl Ramberg karl.ramberg at chello.se
Sun Aug 22 09:06:07 UTC 2004



Trygve Reenskaug wrote:
> 
> Hi,
> 
> I have the following simple code in a PasteUpMorph subclass:
> 
>    symbol := MyMorph new.                 " create "
>    symbol openInHand.                     " place "
>    (self submorphs includes: symbol true) " use "
>       ifFalse: [self error]
> 
> I get the error because HandMorph>>openInHand digresses into the
> jungle on a separate thread to make me place the symbol.
> 
> self submorphs is executed before openInHand is completed, which is
> before symbol is added to submorphs.
> 
> Any way I can wait for HandMorph>>openInHand to complete?
I think you could tell the world to do a cycle.

Karl



More information about the Squeak-dev mailing list