Bert Freudenberg uploaded a new version of Morphic to project The Trunk:
http://source.squeak.org/trunk/Morphic-bf.646.mcz ==================== Summary ==================== Name: Morphic-bf.646 Author: bf Time: 11 April 2013, 3:30:56.731 pm UUID: 5f72066e-da52-4d05-aa68-39f935eb6f49 Ancestors: Morphic-tpr.645 * make project loading work =============== Diff against Morphic-tpr.645 =============== Item was added: + ----- Method: MorphicProject>>createViewIfAppropriate (in category 'utilities') ----- + createViewIfAppropriate + "Create a project view for the receiver and place it appropriately on the screen." + + | aMorph requiredWidth existing proposedV proposedH despair | + ProjectViewOpenNotification signal ifTrue: + [Preferences projectViewsInWindows + ifTrue: + [(ProjectViewMorph newProjectViewInAWindowFor: self) openInWorld] + ifFalse: + [aMorph := ProjectViewMorph on: self. + requiredWidth := aMorph width + 10. + existing := ActiveWorld submorphs + select: [:m | m isKindOf: ProjectViewMorph] + thenCollect: [:m | m fullBoundsInWorld]. + proposedV := 85. + proposedH := 10. + despair := false. + [despair not and: [((proposedH @ proposedV) extent: requiredWidth) intersectsAny: existing]] whileTrue: + [proposedH := proposedH + requiredWidth. + proposedH + requiredWidth > ActiveWorld right ifTrue: + [proposedH := 10. + proposedV := proposedV + 90. + proposedV > (ActiveWorld bottom - 90) + ifTrue: + [proposedH := ActiveWorld center x - 45. + proposedV := ActiveWorld center y - 30. + despair := true]]]. + aMorph position: (proposedH @ proposedV). + aMorph openInWorld]]! Item was added: + ----- Method: MorphicProject>>noteManifestDetailsIn: (in category 'file in/out') ----- + noteManifestDetailsIn: manifestInfo + "The receiver is a project being loaded. From the dictionary provided, absorb and remember whether it's an 'old' (pre-olpc) project, and remember the GUID, user, and prev-GUID associated with the project when these data are available in the incoming manifest." + + | manifestDict oldProject | + manifestInfo isEmptyOrNil ifTrue: [^ self projectParameterAt: #oldProject put: true]. + + manifestDict := (manifestInfo isKindOf: Dictionary) ifTrue: [manifestInfo] ifFalse: [manifestInfo first]. + + oldProject := ((manifestDict at: 'Squeak-Version' ifAbsent: ['']) beginsWith: 'etoys') not. + self projectParameterAt: #oldProject put: oldProject. + + manifestDict at: #URI ifPresent: [:aUri | self projectParameterAt: #URI put: aUri]. + manifestDict at: #user ifPresent: [:aUser | self projectParameterAt: #user put: aUser]. + manifestDict at: #'prev-URI' ifPresent: [:aUri | self projectParameterAt: #'prev-URI' put: aUri]! Item was added: + ----- Method: StringMorph>>label:font: (in category 'accessing') ----- + label: aString font: aFont + "compatible protocol used in ScriptEditorMorph>>bringUpToDate" + self contents: aString. + self font: aFont! Item was changed: + ----- Method: WorldState class>>classVersion (in category 'objects from disk') ----- - ----- Method: WorldState class>>classVersion (in category 'accessing') ----- classVersion + ^2 "force cleanup of alarms and stepList"! - ^1 "force cleanup of alarms and stepList"! Item was added: + ----- Method: WorldState class>>withClassVersion: (in category 'objects from disk') ----- + withClassVersion: aVersion + aVersion <= self classVersion ifTrue: [^self]. + ^super withClassVersion: aVersion! |
Free forum by Nabble | Edit this page |