MorphicProject class openViewAndEnter:
Last updated at 4:20 am UTC on 20 October 2017
This method is called after a project file (pr file) has been loaded successfully.
The argument morphOrList is the object returned by the load process and usually contains the project PasteUpMorph instance.
"morphOrList has been reconstituted from a file. Open it in an appropriate
| contents |
contents := morphOrList.
(morphOrList isKindOf: SqueakPage) ifTrue: [
contents := morphOrList contentsMorph
(contents isKindOf: PasteUpMorph) ifFalse:
[^ self inform: 'This is not a PasteUpMorph or
exported Project.' translated].
(self openViewOn: contents) enter
"Create a new Morphic Project and open a view for the project"
| newProject |
newProject := self new.
aPasteUpOrNil ifNotNil: [newProject installPasteUpAsWorld: aPasteUpOrNil].
ProjectViewMorph openOn: newProject.