hpi-swa / vivide

A Squeak/Smalltalk-based programming environment and framework that supports low-effort construction of graphical tools by employing a data-driven perspective and a script-based programming model.
MIT License
58 stars 9 forks source link

Pane-cycle detection: Restoring ActiveEvent can fail #294

Open marceltaeumel opened 5 years ago

marceltaeumel commented 5 years ago

In ViPane >> #beginUpdateChainWith: we reset ActiveEvent to begin a chain of pane updates programmatically in the model's #updateChildren.

(This is the second approach. The first one is event-based. See ViPane >> #beginUpdateChain using the ActiveEvent itself as update identifier to detect cyclic updates.).

However, resetting the value of ActiveEvent in an ensure-block does -- sometimes -- mix up with the system's #becomeActiveDuring:, which will then leave ActiveEvent not-nil in Morphic's deferred UI messages. In that case, Object >> #currentEvent does not yield the last input event but the value of non-nil ActiveEvent, which will be the same in deferred UI messages. Forever.

marceltaeumel commented 5 years ago

Symptom: "Open tools attached to hand" does not work in Vivide anymore. Fix: Evaluate in a workspace "ActiveEvent := nil"