[squeak-dev] The Trunk: ST80-mt.258.mcz
Eliot Miranda
eliot.miranda at gmail.com
Thu Sep 17 10:56:18 UTC 2020
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
|