David T. Lewis uploaded a new version of Morphic to project The Trunk:
http://source.squeak.org/trunk/Morphic-dtl.1369.mcz ==================== Summary ==================== Name: Morphic-dtl.1369 Author: dtl Time: 20 November 2017, 8:37:22.350027 am UUID: 31d4ec2b-70bb-4e81-8d00-cb186a2fb85c Ancestors: Morphic-dtl.1368 Replace references to World with project current world. Note: These two method were updated previously but one each reference to World was missed. =============== Diff against Morphic-dtl.1368 =============== Item was changed: ----- Method: MorphicProject>>storeSegment (in category 'file in/out') ----- storeSegment "Store my project out on the disk as an ImageSegment. Keep the outPointers in memory. Name it <project name>.seg. *** Caller must be holding (Project alInstances) to keep subprojects from going out. ***" + | currentWorld is sizeHint | + currentWorld := Project current world. + (currentWorld == world) ifTrue: [^ false]. - | is sizeHint | - (Project current world == world) ifTrue: [^ false]. "self inform: 'Can''t send the current world out'." world isInMemory ifFalse: [^ false]. "already done" world ifNil: [^ false]. world presenter ifNil: [^ false]. ScrapBook default emptyScrapBook. + currentWorld checkCurrentHandForObjectToPaste. - World checkCurrentHandForObjectToPaste. world releaseSqueakPages. sizeHint := self projectParameters at: #segmentSize ifAbsent: [0]. is := ImageSegment copyFromRootsLocalFileFor: {world presenter. world} "world, and all Players" sizeHint: sizeHint. is state = #tooBig ifTrue: [^ false]. is segment size < 2000 ifTrue: ["debugging" Transcript show: self name, ' only ', is segment size printString, 'bytes in Segment.'; cr]. self projectParameters at: #segmentSize put: is segment size. is extract; writeToFile: self name. ^ true! Item was changed: ----- Method: MorphicProject>>storeSegmentNoFile (in category 'file in/out') ----- storeSegmentNoFile "For testing. Make an ImageSegment. Keep the outPointers in memory. Also useful if you want to enumerate the objects in the segment afterwards (allObjectsDo:)" + | is currentWorld | + currentWorld := Project current world. + (currentWorld == world) ifTrue: [^ self]. " inform: 'Can''t send the current world out'." - | is | - (Project current world == world) ifTrue: [^ self]. " inform: 'Can''t send the current world out'." world isInMemory ifFalse: [^ self]. "already done" world ifNil: [^ self]. world presenter ifNil: [^ self]. "Do this on project enter" + currentWorld flapTabs do: [:ft | ft referent adaptToWorld: World]. - World flapTabs do: [:ft | ft referent adaptToWorld: World]. "Hack to keep the Menu flap from pointing at my project" "Preferences setPreference: #useGlobalFlaps toValue: false." "Utilities globalFlapTabsIfAny do: [:aFlapTab | Utilities removeFlapTab: aFlapTab keepInList: false]. Utilities clobberFlapTabList. " "project world deleteAllFlapArtifacts." "self currentWorld deleteAllFlapArtifacts. " ScrapBook default emptyScrapBook. + currentWorld checkCurrentHandForObjectToPaste2. - World checkCurrentHandForObjectToPaste2. is := ImageSegment copyFromRootsLocalFileFor: {world presenter. world} "world, and all Players" sizeHint: 0. is segment size < 800 ifTrue: ["debugging" Transcript show: self name, ' did not get enough objects'; cr. ^ Beeper beep]. is extract. "is instVarAt: 2 put: is segment clone." "different memory"! |
Free forum by Nabble | Edit this page |