Etoys: Etoys-kfr.59.mcz

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Etoys: Etoys-kfr.59.mcz

commits-2
Karl Ramberg uploaded a new version of Etoys to project Etoys:
http://source.squeak.org/etoys/Etoys-kfr.59.mcz

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

Name: Etoys-kfr.59
Author: kfr
Time: 17 May 2011, 9:41:26 pm
UUID: 17369473-61ed-614f-83a5-c5656578dfd4
Ancestors: Etoys-kfr.58

fix for deleting Players and associates

=============== Diff against Etoys-kfr.58 ===============

Item was changed:
  ----- Method: Player>>noteDeletionOf:fromWorld: (in category 'customevents-misc') -----
+ noteDeletionOf: aMorph fromWorld: aWorld
- noteDeletionOf: aMorph fromWorld: aWorld
- "aMorph, while pointing to me as its costumee, has been deleted"
- "This may be too aggressive because deletion of a morph may not really mean deletion of its associated player -- in light of hoped-for multiple viewing"
-
  | viewers scriptors viewerFlaps watchers |
  viewers := OrderedCollection new.
  viewerFlaps := OrderedCollection new.
  scriptors := OrderedCollection new.
  watchers := OrderedCollection new.
+ aWorld allMorphs
+ do: [:m |
+ m isAViewer
+ ifTrue: [viewers add: m].
+ ((m isKindOf: ViewerFlapTab)
+ and: [m scriptedPlayer == self])
+ ifTrue: [viewerFlaps add: m].
+ ((m isKindOf: ScriptEditorMorph)
+ and: [m myMorph == aMorph])
- aWorld allMorphs do:
- [:m | m isAViewer ifTrue: [viewers add: m].
- ((m isKindOf: ViewerFlapTab) and: [m scriptedPlayer == self])
- ifTrue:
- [viewerFlaps add: m].
- ((m isKindOf: ScriptEditorMorph) and: [m myMorph == aMorph])
  ifTrue: [scriptors add: m].
+ ((m isKindOf: WatcherWrapper)
+ and: [m associatedPlayer == self])
+ ifTrue: [watchers add: m]].
+ aMorph removeAllEventTriggersFor: self.
- ((m isKindOf: WatcherWrapper) and: [m associatedPlayer == self])
- ifTrue: [watchers add: m]
- ].
-
- aMorph  removeAllEventTriggersFor: self.
  aWorld removeAllEventTriggersFor: self.
+ viewers
+ do: [:v | v noteDeletionOf: aMorph].
+ viewerFlaps
+ do: [:v | v dismissViaHalo].
+ scriptors
+ do: [:s | s privateDelete].
+ watchers
+ do: [:s | s privateDelete]!
- viewers do: [:v |  v noteDeletionOf: aMorph].
- viewerFlaps do: [:v  | v dismissViaHalo].
- scriptors do: [:s | s privateDelete].
- watchers do: [:s | s privateDelete]!

_______________________________________________
etoys-dev mailing list
[hidden email]
http://lists.squeakland.org/mailman/listinfo/etoys-dev