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

David T. Lewis lewis at mail.msen.com
Thu Sep 17 14:37:49 UTC 2020


Thanks Eliot for noticing and thanks Marcel for fixing it.

Just to put the blame where it belongs - the multiple queue issue
is an error that was introduced by me in ST80-dtl.54 more than 10 years
ago. The mistake was mine, Marcel only fixed it.

I simply can't imagine what I was thinking when I left the queue
an Controller instance variable. Maybe it was a mindless copy from
the old DeferredActionStandardSystemController but ugh, what was
I thinking?!?

Sorry,
Dave


On Thu, Sep 17, 2020 at 01:34:40PM +0200, Marcel Taeumel wrote:
> Hi Eliot.
> 
> See??ST80-mt.259. Both MVC and Morphic projects now have the same behavior regarding deferred messages. Each kind of project has its own, single queue.
> 
> Best,
> Marcel
> Am 17.09.2020 13:06:52 schrieb Marcel Taeumel <marcel.taeumel at hpi.de>:
> Hi Eliot.
> 
> >??inside Controller>>processDeferredActions and have Controller>>controlActivity read
> 
> This would produce an endless recursion. But one could check with #== to avoid that. :-)
> 
> >??Shouldn???t there in fact be a single SharedQueue for deferred actions?
> 
> Agreed. This would be a next step, now that we can see that this is actually happening. Might have been by accident so far.
> 
> ??>??Is this bug in Morphic too?
> 
> No, in Morphic, there is only single queue for all Morphic projects. It's a class variable in WorldState.
> 
> Best,
> Marcel
> Am 17.09.2020 12:56:30 schrieb Eliot Miranda <eliot.miranda at gmail.com>:
> Hi Marcel,
> 
> > On Sep 17, 2020, at 12:15 AM, commits at source.squeak.org wrote:
> >
> > ???Marcel Taeumel uploaded a new version of ST80 to project The Trunk:
> > http://source.squeak.org/trunk/ST80-mt.258.mcz
> >
> > ==================== Summary ====================
> >
> > Name: ST80-mt.258
> > Author: mt
> > Time: 17 September 2020, 9:15:53.534726 am
> > UUID: c7ff9de0-a71a-4646-a639-211d94848498
> > Ancestors: ST80-mt.257
> >
> > Fixes processing of deferred actions in MVC.
> >
> > Note that windows in MVC delegate control to their sub-controllers, however, remaining the active controller from the project's world perspective (i.e. the controller manager). Thus, we have to process two deferred-action queues in for most cases. For example, the text field in a workspace involves a PluggableTextController, embedded in a StandardSystemController. Any do-it like "Project current addDeferredUIMessage: [...]" will add the message to the StandardSystemController's queue.
> >
> > =============== Diff against ST80-mt.257 ===============
> >
> > 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 deferredActionQueue isEmpty]
> > - whileFalse: [deferredActionQueue next value].
> > self controlToNextLevel!
> >
> > Item was added:
> > + ----- Method: Controller>>processDeferredActions (in category 'control defaults') -----
> > + processDeferredActions
> > +
> > + [self deferredActionQueue isEmpty]
> > + whileFalse: [deferredActionQueue next value].!
> >
> > Item was changed:
> > ----- Method: ParagraphEditor>>normalActivity (in category 'controlling') -----
> > normalActivity
> > self processKeyboard.
> > + self processMouseButtons.
> > + super normalActivity.
> > + !
> > - self processMouseButtons!
> 
> first regarding the fix, wouldn???t it make more sense to put
> 
> Project current world activeController processDeferredActions.
> 
> inside Controller>>processDeferredActions and have Controller>>controlActivity read
> 
> Controller|controlLoop each time through the main control loop. It should
> be redefined in a subclass if some other action is needed."
> 
> self processDeferredActions.
> self controlToNextLevel
> 
> ?
> 
> Second, doesn???t the two queue solution introduce a serious bug? Doesn???t it reorder deferred actions depending on which queue the action gets added to? Shouldn???t there in fact be a single SharedQueue for deferred actions? Is this bug in Morphic too?
> 
> _,,,^..^,,,_ (phone)
> 

> 



More information about the Squeak-dev mailing list