Karl Ramberg uploaded a new version of Morphic to project Etoys:
http://source.squeak.org/etoys/Morphic-kfr.56.mcz==================== Summary ====================
Name: Morphic-kfr.56
Author: kfr
Time: 17 May 2011, 9:45:49 pm
UUID: c6692314-d323-6140-8a7f-b24cfe7642b6
Ancestors: Morphic-kfr.55
Fix for deleting morph with scripted submorphs
=============== Diff against Morphic-kfr.55 ===============
Item was changed:
----- Method: Morph>>delete (in category 'submorphs-add/remove') -----
delete
- "Remove the receiver as a submorph of its owner and make its
- new owner be nil."
-
| aWorld |
+ aWorld := self world
+ ifNil: [World].
+ aWorld
+ ifNotNil: [self disableSubmorphFocusForHand: self activeHand.
+ self activeHand
+ ifNotNilDo: [:h |
+ h releaseKeyboardFocus: self.
+ h releaseMouseFocus: self]].
- aWorld := self world ifNil: [World].
- "Terminate genie recognition focus"
- "I encountered a case where the hand was nil, so I put in a little
- protection - raa "
- " This happens when we are in an MVC project and open
- a morphic window. - BG "
- aWorld ifNotNil:
- [self disableSubmorphFocusForHand: self activeHand.
- self activeHand ifNotNilDo:
- [:h | h releaseKeyboardFocus: self.
- h releaseMouseFocus: self]].
self removeHalo.
+ owner
+ ifNotNil: [self privateDelete.
+ self player
+ ifNotNilDo: [:player | player noteDeletionOf: self fromWorld: aWorld].
+ self
+ submorphsDo: [:each | each player
+ ifNotNilDo: [:player | player noteDeletionOf: each fromWorld: aWorld]]]!
- owner ifNotNil:[ self privateDelete.
- self player ifNotNilDo: [ :player |
- "Player must be notified"
- player noteDeletionOf: self fromWorld: aWorld]].!
_______________________________________________
etoys-dev mailing list
[hidden email]
http://lists.squeakland.org/mailman/listinfo/etoys-dev