links to this page:    
View this PageEdit this PageUploads to this PageHistory of this PageTop of the SwikiRecent ChangesSearch the SwikiHelp Guide
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.

 openViewAndEnter: morphOrList
	"morphOrList has been reconstituted from a file. Open it in an appropriate
 	Morphic world."

	| 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

 openViewOn: aPasteUpOrNil
	"Create a new Morphic Project and open a view for the project"
	| newProject |
	newProject := self new.
	aPasteUpOrNil ifNotNil: [newProject installPasteUpAsWorld: aPasteUpOrNil].
	ProjectViewMorph openOn: newProject.