When are the deferred UI messages processed ?

Joseph Frippiat frippiat.j at kst.be
Wed Dec 8 08:34:59 UTC 2004


endEntry ... like in QHsmTestSM>>dispatch: of course !
I have read your code for FSM because I will need it to implement a
communication protocol. Sorry, I forgot.

You're a master.

Thanks

Joseph

-----Original Message-----
From: Ned Konz [mailto:ned at squeakland.org]
Sent: Wednesday, December 08, 2004 6:27 AM
To: frippiat.j at kst.be; The general-purpose Squeak developers list
Subject: Re: When are the deferred UI messages processed ?


On Tuesday 07 December 2004 6:58 am, Joseph Frippiat wrote:
> I use the method logDirection:andBytes: from the changeset RCX.1.cs .
> This method uses WorldState addDeferredUIMessage:
>
>  WorldState addDeferredUIMessage: [
>  Transcript nextPutAll: dir;
>   nextPutAll: string size printString;
>   nextPutAll: ' bytes: '.
>   string do: [ :ch | Transcript
>    nextPutAll: (Character value: ch) hex;
>    space ].
>   Transcript cr; flush
>  ]
>
> "Before", it was working, and now it isn't : nothing appears on the
> Transcript.

Have you tried #endEntry instead of #flush?

> When are the deferred UI messages processed ?

In the middle of the Morphic event loop, just after responding to events,
and
before doing other step methods and displaying the world.

Look for implementors of #addDeferredUIMessage:, look at the one in
WorldState, look for senders of #deferredUIMessages, and you'll see
WorldState>>runStepMethodsIn: which empties the queue.

And it's called from doOneCycleNowFor: which is  the body of the main
Morphic
event loop.

--
Ned Konz
http://bike-nomad.com/squeak/




More information about the Squeak-dev mailing list