Balázs Kósi uploaded a new version of Morphic to project The Trunk:
http://source.squeak.org/trunk/Morphic-kb.1143.mcz ==================== Summary ==================== Name: Morphic-kb.1143 Author: kb Time: 10 May 2016, 11:45:07.978281 pm UUID: 8e7819ed-0a1d-4a4d-9c6b-23ce3272097c Ancestors: Morphic-mt.1142 Fix DockingBarMorph keeping unnecessary references to oldMouseFocus and oldKeyboardFocus by clearing them when deactivating. =============== Diff against Morphic-mt.1142 =============== Item was changed: ----- Method: DockingBarMorph>>deactivate: (in category 'events') ----- deactivate: evt + | newKeyboardFocus newMouseFocus | self selectItem: nil event: evt. + newKeyboardFocus := self oldKeyboardFocus. + newMouseFocus := self oldMouseFocus. + oldKeyboardFocus := oldMouseFocus := nil. evt hand + newKeyboardFocus: newKeyboardFocus; + newMouseFocus: newMouseFocus! - newKeyboardFocus: self oldKeyboardFocus; - newMouseFocus: self oldMouseFocus! |
This may help Eliot in his case this time, but there are other places
which could just as easily trap a reference to a user's "domain" object just as inconspicuously. Like the World 'stepList' or the WorldState's 'commandHistory'. Maybe we need some kind of registration/release mechanism..?? On Tue, May 10, 2016 at 4:45 PM, <[hidden email]> wrote: > Balázs Kósi uploaded a new version of Morphic to project The Trunk: > http://source.squeak.org/trunk/Morphic-kb.1143.mcz > > ==================== Summary ==================== > > Name: Morphic-kb.1143 > Author: kb > Time: 10 May 2016, 11:45:07.978281 pm > UUID: 8e7819ed-0a1d-4a4d-9c6b-23ce3272097c > Ancestors: Morphic-mt.1142 > > Fix DockingBarMorph keeping unnecessary references to oldMouseFocus and oldKeyboardFocus by clearing them when deactivating. > > =============== Diff against Morphic-mt.1142 =============== > > Item was changed: > ----- Method: DockingBarMorph>>deactivate: (in category 'events') ----- > deactivate: evt > > + | newKeyboardFocus newMouseFocus | > self selectItem: nil event: evt. > + newKeyboardFocus := self oldKeyboardFocus. > + newMouseFocus := self oldMouseFocus. > + oldKeyboardFocus := oldMouseFocus := nil. > evt hand > + newKeyboardFocus: newKeyboardFocus; > + newMouseFocus: newMouseFocus! > - newKeyboardFocus: self oldKeyboardFocus; > - newMouseFocus: self oldMouseFocus! > > |
On 11.05.2016, at 00:55, Chris Muller <[hidden email]> wrote: > This may help Eliot in his case this time, but there are other places > which could just as easily trap a reference to a user's "domain" > object just as inconspicuously. > > Like the World 'stepList' or the WorldState's 'commandHistory'. > > Maybe we need some kind of registration/release mechanism..?? Or making those weak? Best regards -Tobias > > On Tue, May 10, 2016 at 4:45 PM, <[hidden email]> wrote: >> Balázs Kósi uploaded a new version of Morphic to project The Trunk: >> http://source.squeak.org/trunk/Morphic-kb.1143.mcz >> >> ==================== Summary ==================== >> >> Name: Morphic-kb.1143 >> Author: kb >> Time: 10 May 2016, 11:45:07.978281 pm >> UUID: 8e7819ed-0a1d-4a4d-9c6b-23ce3272097c >> Ancestors: Morphic-mt.1142 >> >> Fix DockingBarMorph keeping unnecessary references to oldMouseFocus and oldKeyboardFocus by clearing them when deactivating. >> >> =============== Diff against Morphic-mt.1142 =============== >> >> Item was changed: >> ----- Method: DockingBarMorph>>deactivate: (in category 'events') ----- >> deactivate: evt >> >> + | newKeyboardFocus newMouseFocus | >> self selectItem: nil event: evt. >> + newKeyboardFocus := self oldKeyboardFocus. >> + newMouseFocus := self oldMouseFocus. >> + oldKeyboardFocus := oldMouseFocus := nil. >> evt hand >> + newKeyboardFocus: newKeyboardFocus; >> + newMouseFocus: newMouseFocus! >> - newKeyboardFocus: self oldKeyboardFocus; >> - newMouseFocus: self oldMouseFocus! |
In reply to this post by Chris Muller-3
Hi Chris and all,
the world state's "stepList" is fine, because the entries will be removed before processed and then only re-added if the processing went well. See WorldState >> #runLocalStepMethodsIn: and all references to the instance variable "lastStepMessage" to understand why it can be nil after evaluating it. A world state's "commandHistory" can be cleared via the menu Extras > "Purge Undo Records". This is also done in CommandHistory class >> #cleanUp. If you collect garbage via "Utilities garbageCollectAndReport", you get notified of any records in the history. Memo to myself: I still have to bring CommandHistory and TextEditorCommandHistory back together. Best, Marcel |
Free forum by Nabble | Edit this page |