MorphicProject class openViewAndEnter:
Last updated at 3:51 am UTC on 6 December 2021
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.
How to create a new Morphic project with code - example 1