'From Squeak3.1alpha of 5 February 2001 [latest update: #3598] on 14 February 2001 at 8:22:50 pm'! "Change Set: utFixes Date: 13 February 2001 Author: Bob Arning A couple of bugs encountered while testing Universal Tiles - MessageNode>>receiver: was returning the argument which messed up a few things - unhibernating universal scripts on a loaded project was difficult since they were carrying a source pointer but there source was not yet present. Unhibernating deferred until project entry. "! !ImageSegment methodsFor: 'fileIn/Out' stamp: 'RAA 2/13/2001 21:10'! comeFullyUpOnReload: smartRefStream "fix up the objects in the segment that changed size. An object in the segment is the wrong size for the modern version of the class. Construct a fake class that is the old size. Replace the modern class with the old one in outPointers. Load the segment. Traverse the instances, making new instances by copying fields, and running conversion messages. Keep the new instances. Bulk forward become the old to the new. Let go of the fake objects and classes. After the install (below), arrayOfRoots is filled in. Globalize new classes. Caller may want to do some special install on certain objects in arrayOfRoots. May want to write the segment out to disk in its new form." | mapFakeClassesToReal ccFixups receiverClasses rootsToUnhiberhate myProject | self flag: #bobconv. RecentlyRenamedClasses _ nil. "in case old data hanging around" mapFakeClassesToReal _ smartRefStream reshapedClassesIn: outPointers. "Dictionary of just the ones that change shape. Substitute them in outPointers." ccFixups _ self remapCompactClasses: mapFakeClassesToReal refStrm: smartRefStream. ccFixups ifFalse: [^ self error: 'A class in the file is not compatible']. endMarker _ segment nextObject. "for enumeration of objects" endMarker == 0 ifTrue: [endMarker _ 'End' clone]. arrayOfRoots _ self loadSegmentFrom: segment outPointers: outPointers. "Can't use install. Not ready for rehashSets" mapFakeClassesToReal isEmpty ifFalse: [ self reshapeClasses: mapFakeClassesToReal refStream: smartRefStream ]. receiverClasses _ self restoreEndianness. "rehash sets" smartRefStream checkFatalReshape: receiverClasses. "Classes in this segment." arrayOfRoots do: [:importedObject | importedObject class class == Metaclass ifTrue: [self declare: importedObject]]. arrayOfRoots do: [:importedObject | (importedObject isKindOf: Project) ifTrue: [ myProject _ importedObject. importedObject ensureChangeSetNameUnique. Project addingProject: importedObject. importedObject restoreReferences. ScriptEditorMorph writingUniversalTiles: (importedObject world valueOfProperty: #universalTiles)]]. rootsToUnhiberhate _ arrayOfRoots select: [:importedObject | importedObject respondsTo: #unhibernate "ScriptEditors and ViewerFlapTabs" ]. myProject ifNotNil: [ myProject world setProperty: #thingsToUnhibernate toValue: rootsToUnhiberhate ]. mapFakeClassesToReal isEmpty ifFalse: [ mapFakeClassesToReal keys do: [:aFake | aFake indexIfCompact > 0 ifTrue: [aFake becomeUncompact]. aFake removeFromSystemUnlogged]. SystemOrganization removeEmptyCategories]. "^ self"! ! !MessageNode methodsFor: 'equation translation' stamp: 'RAA 2/14/2001 14:07'! receiver: val "14 feb 2001 - removed return arrow" receiver _ val! ! !Project methodsFor: 'menu messages' stamp: 'RAA 2/13/2001 21:12'! finalEnterActions | navigator armsLengthCmd navType thingsToUnhibernate | 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 showProjectNavigator & 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 ].! !