When are the deferred UI messages processed?
Last updated at 10:11 pm UTC on 25 August 2016
Joseph Frippiat December 07, 2004 When are the deferred UI messages processed? I use the method logDirection:andBytes: from the changeset RCX.1.cs . This method uses When are the deferred UI messages processed?
WorldState addDeferredUIMessage: [
Transcript nextPutAll: dir;
nextPutAll: string size printString;
nextPutAll: ' bytes: '.
string do: [ :ch | Transcript
nextPutAll: (Character value: ch) hex;
Transcript cr; flush
"Before", it was working, and now it isn't : nothing appears on the Transcript. When are the deferred UI messages processed?
Have you tried #endEntry instead of #flush?
Deferred UI messages are 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.
... like in QHsmTestSM>>dispatch: of course!