[squeak-dev] Transcript error when forceUpdate: false (?)

jaromir m at jaromir.net
Mon Jan 25 20:38:26 UTC 2021


Well, I tried deferring the whole Transcript endEntry machinery to the UI
doOneCycle (bypassing the changed: #appendEntryLater mechanism) for
#forceUpdate = false only ... and it seems to avoid the problem!

TranscriptStream >> endEntry

	deferredEntry ifNil: [ false ].    "this is a new instance variable"
	self semaphore critical:[
		self class forceUpdate
			ifTrue: [self changed: #appendEntry; reset]
			ifFalse: [deferredEntry := true].


TranscriptStream >> flushDeferredEntry
	"This is run every UI cycle in doOneCycleNowFor:"

	deferredEntry ifTrue: [
		self class forceUpdate: true.
		self endEntry.
		deferredEntry := false.
		self class forceUpdate: false.
		]

doOneCycleNowFor: aWorld
	
	"... the whole body remains unchanged except:"
	
	capturingGesture ifFalse: 
		[aWorld runStepMethods.		
		Transcript flushDeferredEntry.     "this is printing for #forceUpdate =
false"
		self displayWorldSafely: aWorld].


For #forceUpdate = true the endEntry mechanism remains unchanged and failing
as before...



--
Sent from: http://forum.world.st/Squeak-Dev-f45488.html


More information about the Squeak-dev mailing list