The Trunk: Morphic-dtl.1371.mcz

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

The Trunk: Morphic-dtl.1371.mcz

commits-2
David T. Lewis uploaded a new version of Morphic to project The Trunk:
http://source.squeak.org/trunk/Morphic-dtl.1371.mcz

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

Name: Morphic-dtl.1371
Author: dtl
Time: 21 November 2017, 8:51:51.176344 am
UUID: d55fdc21-3a6f-44bd-a61f-99716b1cb7cf
Ancestors: Morphic-dtl.1370

Revert Morph>>delete change, because after calling #privateDelete, #isInWorld will always be false.
Fix unintended block var assignment in previous updates.

=============== Diff against Morphic-dtl.1370 ===============

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 |
  self removeHalo.
 
  self isInWorld ifTrue: [
  self disableSubmorphFocusForHand: self activeHand.
  self activeHand
    releaseKeyboardFocus: self;
  releaseMouseFocus: self].
 
+ "Preserve world reference for player notificaiton. See below."
+ aWorld := self world ifNil: [World].
+
+ owner ifNotNil:[
- owner ifNotNil: [
  self privateDelete.
  self player ifNotNil: [:player |
+ player noteDeletionOf: self fromWorld: aWorld]].!
- self isInWorld ifTrue: [
- player noteDeletionOf: self fromWorld: self world]]].!

Item was changed:
  ----- Method: MorphicProject>>clearGlobalState (in category 'enter') -----
  clearGlobalState
  "Clean up global state. The global variables World, ActiveWorld, ActiveHand and ActiveEvent
  provide convenient access to the state of the active project in Morphic. Clear their prior values
  when leaving an active project. This method may be removed if the use of global state variables
  is eliminated."
 
+ (Smalltalk at: #World ifAbsent: [])
+ ifNotNil: [ Smalltalk at: #World put: nil ]. "If global World is defined, clear it now"
- (Smalltalk at: #World ifAbsent: []) ifNotNil: [:w | w := nil]. "If global World is defined, clear it now"
  ActiveWorld := ActiveHand := ActiveEvent := nil.
  !

Item was changed:
  ----- Method: MorphicProject>>finalEnterActions: (in category 'enter') -----
  finalEnterActions: leavingProject
  "Perform the final actions necessary as the receiver project is entered"
 
  | navigator armsLengthCmd navType thingsToUnhibernate |
  "If this image has a global World variable, update it now"
  (Smalltalk at: #World ifAbsent: [])
+ ifNotNil: [ Smalltalk at: #World put: world ].  "Signifies Morphic"
- ifNotNil: [:w | w := world].  "Signifies Morphic"
  world install.
  world transferRemoteServerFrom: leavingProject world.
  "(revertFlag | saveForRevert | forceRevert) ifFalse: [
  (Preferences valueOfFlag: #projectsSentToDisk) ifTrue: [
  self storeSomeSegment]]."
 
  "Transfer event recorder to me."
  leavingProject isMorphic ifTrue: [
  leavingProject world pauseEventRecorder ifNotNil: [:rec |
  rec resumeIn: world]].
 
  world triggerOpeningScripts.
 
 
  self initializeMenus.
  self projectParameters
  at: #projectsToBeDeleted
  ifPresent: [ :projectsToBeDeleted |
  self removeParameter: #projectsToBeDeleted.
  projectsToBeDeleted do: [:each | each delete]].
 
  Locale switchAndInstallFontToID: self localeID.
 
  thingsToUnhibernate := world valueOfProperty: #thingsToUnhibernate ifAbsent: [#()].
  thingsToUnhibernate do: [:each | each unhibernate].
  world removeProperty: #thingsToUnhibernate.
 
  navType := ProjectNavigationMorph preferredNavigator.
  armsLengthCmd := self parameterAt: #armsLengthCmd ifAbsent: [nil].
  navigator := world findA: navType.
  (Preferences classicNavigatorEnabled and: [Preferences showProjectNavigator and: [navigator isNil]]) ifTrue:
  [(navigator := navType new)
  bottomLeft: world bottomLeft;
  openInWorld: world].
  navigator notNil & armsLengthCmd notNil ifTrue:
  [navigator color: Color lightBlue].
  armsLengthCmd notNil ifTrue:
  [Preferences showFlapsWhenPublishing
  ifFalse:
  [self flapsSuppressed: true.
  navigator ifNotNil: [navigator visible: false]].
  armsLengthCmd openInWorld: world].
  world reformulateUpdatingMenus.
  world presenter positionStandardPlayer.
  self assureMainDockingBarPresenceMatchesPreference.
 
  world repairEmbeddedWorlds.!