This will get stuck if running in the UI process itself...
Regards, Gary
----- Original Message -----
From: "Sean P. DeNigris" <
[hidden email]>
To: <
[hidden email]>
Sent: Saturday, December 10, 2011 7:38 AM
Subject: [Pharo-project] Waiting for deferred UI messages
> testSimulateRightClick
>
> | workspace menu sem |
> workspace := Workspace open.
> [ morph := World submorphThat: [ :m | m model == workspace ] ifNone: [ nil
> ].
> (Delay forMilliseconds: 100) wait.
> morph isNil ] whileTrue.
>
> WorldState addDeferredUIMessage: [ morph simulateRightClick ].
>
>
> [ "execution gets stuck in this loop"
> menu := World submorphThat: [:m | m isKindOf: MenuMorph ] ifNone: [ nil ].
> (Delay forMilliseconds: 100) wait.
> menu isNil ] whileTrue.
> self assert: menu isNil not.
> menu delete.
>
> When running from OB, the above deferred message block never gets
> evaluated.
> Execution loops forever in the last block. I thought that the delay would
> give the UI an opportunity to process it. How do I modify this to work?
>
> Thanks.
> Sean
>
> --
> View this message in context:
>
http://forum.world.st/Waiting-for-deferred-UI-messages-tp4179541p4179541.html> Sent from the Pharo Smalltalk mailing list archive at Nabble.com.
>