[squeak-dev] The Trunk: System-dtl.170.mcz
commits at source.squeak.org
commits at source.squeak.org
Sun Nov 22 22:53:59 UTC 2009
David T. Lewis uploaded a new version of System to project The Trunk:
http://source.squeak.org/trunk/System-dtl.170.mcz
==================== Summary ====================
Name: System-dtl.170
Author: dtl
Time: 22 November 2009, 6:50:24 am
UUID: 961e4a03-4cc6-402d-bfe4-e01808dda7d1
Ancestors: System-dtl.169
Remove Morphic dependencies from Project>>okToChange.
Add Project>>prepareForDelete and MorphicProject>>prepareForDelete to handle Morphic specific cleanup actions.
Remove some apparently unneeded logic by changing from this:
ok := world isMorph not and: [world scheduledControllers size <= 1].
ok ifFalse: [self isMorphic ifTrue:
[self parent == CurrentProject
ifFalse: [^ true]]]. "view from elsewhere. just delete it."
to this:
self parent == CurrentProject
ifFalse: [^ true]. "view from elsewhere. just delete it."
=============== Diff against System-dtl.169 ===============
Item was changed:
----- Method: Project>>okToChange (in category 'release') -----
okToChange
"Answer whether the window in which the project is housed can be dismissed -- which is destructive. We never clobber a project without confirmation"
- | ok is list |
self subProjects size >0 ifTrue:
[self inform:
('The project {1}
contains sub-projects. You must remove these
explicitly before removing their parent.' translated format:{self name}).
^ false].
+ self parent == CurrentProject
+ ifFalse: [^ true]. "view from elsewhere. just delete it."
+ (self confirm:
- ok := world isMorph not and: [world scheduledControllers size <= 1].
- ok ifFalse: [self isMorphic ifTrue:
- [self parent == CurrentProject
- ifFalse: [^ true]]]. "view from elsewhere. just delete it."
- ok := (self confirm:
('Really delete the project
{1}
+ and all its windows?' translated format:{self name}))
+ ifFalse: [^ false].
- and all its windows?' translated format:{self name})).
-
- ok ifFalse: [^ false].
+ self prepareForDelete.
- world isMorph ifTrue:
- [Smalltalk at: #WonderlandCameraMorph ifPresent:[:aClass |
- world submorphs do: "special release for wonderlands"
- [:m | (m isKindOf: aClass)
- and: [m getWonderland release]]].
- "Remove Player classes and metaclasses owned by project"
- is := ImageSegment new arrayOfRoots: (Array with: self).
- (list := is rootsIncludingPlayers) ifNotNil:
- [list do: [:playerCls |
- (playerCls respondsTo: #isMeta) ifTrue:
- [playerCls isMeta ifFalse:
- [playerCls removeFromSystemUnlogged]]]]].
self removeChangeSetIfPossible.
"do this last since it will render project inaccessible to #allProjects and their ilk"
ProjectHistory forget: self.
Project deletingProject: self.
^ true
!
Item was added:
+ ----- Method: Project>>prepareForDelete (in category 'release') -----
+ prepareForDelete
+ "The window in which the project is housed is about to deleted. Perform
+ any necessary actions to prepare for deletion. For an MVC project, no
+ action is required."
+ !
More information about the Squeak-dev
mailing list
|