[squeak-dev] The Trunk: ST80-mt.259.mcz

commits at source.squeak.org commits at source.squeak.org
Thu Sep 17 11:33:37 UTC 2020


Marcel Taeumel uploaded a new version of ST80 to project The Trunk:
http://source.squeak.org/trunk/ST80-mt.259.mcz

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

Name: ST80-mt.259
Author: mt
Time: 17 September 2020, 1:33:37.991573 pm
UUID: 8717279a-d050-7a42-9989-bb849160b60d
Ancestors: ST80-mt.258

Let there be only one queue of deferred actions for all MVC projects to mirror the behavior of Morphic projects.

=============== Diff against ST80-mt.258 ===============

Item was changed:
  Object subclass: #ControlManager
  	instanceVariableNames: 'scheduledControllers activeController activeControllerProcess screenController newTopClicked'
+ 	classVariableNames: 'DeferredActionQueue'
- 	classVariableNames: ''
  	poolDictionaries: ''
  	category: 'ST80-Controllers'!
  
  !ControlManager commentStamp: '<historical>' prior: 0!
  I represent the top level control over scheduling which controller of a view on the screen the user is actively using. ScheduledControllers is the global reference to an instance of me, the one attached to the Project currently being used.!

Item was added:
+ ----- Method: ControlManager class>>addDeferredUIMessage: (in category 'class initialization') -----
+ addDeferredUIMessage: valuableObject 
+ 	"Arrange for valuableObject to be evaluated the next time the controlActivity in any controller becomes active."
+ 
+ 	self deferredActionQueue nextPut: valuableObject.!

Item was added:
+ ----- Method: ControlManager class>>deferredActionQueue (in category 'class initialization') -----
+ deferredActionQueue
+ 
+ 	^DeferredActionQueue ifNil: [DeferredActionQueue := SharedQueue new]!

Item was added:
+ ----- Method: ControlManager>>processDeferredActions (in category 'scheduling') -----
+ processDeferredActions
+ 
+ 	[self class deferredActionQueue isEmpty]
+ 		whileFalse: [self class deferredActionQueue next value].!

Item was removed:
- ----- Method: Controller>>addDeferredUIMessage: (in category 'basic control sequence') -----
- addDeferredUIMessage: valuableObject 
- 	"Arrange for valuableObject to be evaluated the next time the 
- 	controlActivity for this controller becomes active."
- 
- 	self deferredActionQueue nextPut: valuableObject!

Item was changed:
  ----- Method: Controller>>controlActivity (in category 'control defaults') -----
  controlActivity
  	"Pass control to the next control level (that is, to the Controller of a 
  	subView of the receiver's view) if possible. It is sent by 
  	Controller|controlLoop each time through the main control loop. It should 
  	be redefined in a subclass if some other action is needed."
  
  	self processDeferredActions.
- 	Project current world activeController processDeferredActions.
  	self controlToNextLevel!

Item was changed:
  ----- Method: Controller>>processDeferredActions (in category 'control defaults') -----
  processDeferredActions
+ 
+ 	Project current isMVC ifFalse: [^ self].
+ 	Project current world processDeferredActions.!
- 	
- 	[self deferredActionQueue isEmpty]
- 		whileFalse: [deferredActionQueue next value].!

Item was changed:
  ----- Method: MVCProject>>addDeferredUIMessage: (in category 'scheduling & debugging') -----
  addDeferredUIMessage: valuableObject 
  	"Arrange for valuableObject to be evaluated at a time when the user interface
  	is in a coherent state."
  
+ 	self flag: #discuss. "mt: Why are deferred UI messages shared among all MVC projects?"
+ 	ControlManager addDeferredUIMessage: valuableObject.!
- 	world activeController
- 		ifNotNil: [:controller | controller addDeferredUIMessage: valuableObject]!



More information about the Squeak-dev mailing list