The Inbox: ST80-ct.309.mcz

[email protected] Wed, 10 Jun 2026 18:53:52 0000
Newsgroups gmane.comp.lang.smalltalk.squeak.general
Message-ID <[email protected]>
Christoph Thiede uploaded a new version of ST80 to project The Inbox:
http://source.squeak.org/inbox/ST80-ct.309.mcz

==================== Summary ====================

Name: ST80-ct.309
Author: ct
Time: 10 June 2026, 8:37:44.421569 pm
UUID: 7aa0b8a8-a9af-4040-afe4-085f15676cb6
Ancestors: ST80-mt.308

Avoids stale deferred actions in an empty MVC world. For instance, this becomes visible when doing an emergency project enter (via self primitiveError: 'hi' from a child project): before this patch, the new debugger did not pop up until the user opens a tool or opens and closes the world menu.

Normally, deferred actions in MVC are processed in Controller>>controlActivity after subclasses have done their own activity. However, the screen controller never gets active before the user presses a button. Until then, it continuously terminates by returning to [] in ControlManager>>activeController: and gets restarted via #searchForActiveController from there. To avoid indefinite delaying of deferred actions, this patch manually processes them before terminating the screen controller.

Please review. An alternative approach could be keeping the screen controller active (isControlActive) forever instead of continuously rescheduling it. However, this would not allow other controllers scheduled asynchronously to take control immediately.

Thanks to Marcel (mt) for the bug report!

=============== Diff against ST80-mt.308 ===============

Item was added:
+ ----- Method: ScreenController>>controlTerminate (in category 'control defaults') -----
+ controlTerminate
+ 
+ 	super controlTerminate.
+ 	
+ 	"The screen controller only gets active when pressing a button; until then we continuously terminate and restart the receiver via searchForActiveController (see ControlManager>>activeController:). Thus manually process deferred actions here in order to avoid delaying them infinitely."
+ 	self processDeferredActions.!

Squeak-dev mailing list -- [email protected]
To unsubscribe send an email to [email protected]