Test project saving / loading
Last updated at 8:45 am UTC on 8 March 2019
The following code pasted into a Workspace constructs some content in a MorphicProject.
It may serve as a test case for project saving / loading.
Code to construct a simple slide.
slideExtent := 800@600.
mySlide := Morph new extent: slideExtent; color: Color white.
mySlide setProperty: #isSlide toValue: true.
box := Morph new extent: (slideExtent * 0.2).
mySlide addMorph: box.
box := Morph new extent: (slideExtent * 0.2).
box position: (mySlide position + (slideExtent * 0.2)).
box color: Color red.
mySlide addMorph: box.
box := Morph new extent: (slideExtent * 0.2).
box position: (mySlide position + 2* (slideExtent * 0.2)).
box color: Color yellow.
mySlide addMorph: box.
box := Morph new extent: (slideExtent * 0.2).
box position: (mySlide position + 3* (slideExtent * 0.2)).
box color: Color green.
mySlide addMorph: box.
box := Morph new extent: (slideExtent * 0.2).
box position: (mySlide position + 4* (slideExtent * 0.2)).
box color: Color orange.
mySlide addMorph: box.
mySlide openInWorld
Then save project
and
load it in a different image.
Result
Works fine both in 32bit and 64 bit image version of Squeak 5.2