Squeak SmalltalkJoker Squeak Smalltalk : Morphic : prevnext Very Deep Copy Project

>   I have created a project, in which I editted a
> BookMorph. Now in another project, I want to directly
> use this BookMorph again. How can I do this?
If you have the original project loaded, then you can get to it.
The easiest way is to use the halo menu and say "copy and print...
/copy to paste buffer", then go to the other project, open the World
menu, and say "new morph/from paste buffer". But this will give you a
duplicate (via veryDeepCopy), so any changes to the original will not
be made in the new one.
The BookMorph itself can only be owned by one World and one Project.
You could have it move itself between projects if you wanted by doing
something like:
oldWorld   (Project named: 'OldProject') world.
newWorld   (Project named: 'NewProject') world.
book   oldWorld submorphNamed: 'Book'.
newWorld when: #aboutToEnterWorld send: #addMorphFront: to: newWorld
with: book.
oldWorld when: #aboutToEnterWorld send: #addMorphFront: to: oldWorld
with: book.
And then when you got tired of it doing this, you could say:
newWorld removeActionsSatisfying: [ :action | (action arguments at: 1
ifAbsent: []) isKindOf: BookMorph ] forEvent: #aboutToEnterWorld.
oldWorld removeActionsSatisfying: [ :action | (action arguments at: 1
ifAbsent: []) isKindOf: BookMorph ] forEvent: #aboutToEnterWorld.