Squeak
  links to this page:    
View this PageEdit this Page (locked)Uploads to this PageHistory of this PageTop of the SwikiRecent ChangesSearch the SwikiHelp Guide
When are the deferred UI messages processed?
Last updated at 4:31 pm UTC on 14 January 2006
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? 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. When are the deferred UI messages processed?

How to save a part bin 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.
Joseph Frippiat endEntry ... like in QHsmTestSM>>dispatch: of course!