Saving morphs to file

Chris Muller chris at funkyobjects.org
Mon Jul 17 17:41:29 UTC 2006


Hi Noury, if you are in 3.7 or 3.8 you can use Magma to transfer a
project containing Connected Morphs to another image.  Blocks and
CompiledMethods are no problem.

After loading the MagmaServerLoader package from the "MagmaTester"
project on SqueakSource, go outside the project you want to save, then
type:

  MagmaRepositoryController 
    create: 'c:\temp\myProject' 
    root: (Project named: 'the name of project you want to save'

Then, in target image:

  session := MagmaSession openLocal: 'c:\temp\myProject'.
  "Materialization alone will add it to AllProjects"
  session root inspect.
  session disconnectAndClose.

You can then go into the project.

Good luck,
  Chris


--- Noury Bouraqadi <bouraqadi at ensm-douai.fr> wrote:

> Hi,
> 
> I'd like to point out that morph saving doesn't always work. I 
> encountred the problem with a PluggableListMoprh. Serializing such 
> morph leads to serializing a block context which needs it's orginal 
> method. How to workaround this?
> 
> Noury
> Le 16 juil. 06, à 11:34, Lic. Edgar J. De Cleene a écrit :
> 
> > Damien Cassou puso en su mail :
> >
> >> Hi,
> >>
> >> how can I save a morph to a file so that I can load it back later
> ?
> >>
> >> The morph is a UMLPackage made with Connectors (this package is
> very 
> >> cool).
> >>
> >>
> >> Thank you
> > Select the morph via halo, go to debug menu, select save morph in
> file.
> > And if you wish a more "intelligent morph" , what load in almost
> any 
> > Squeak.
> > In the debug menu select inspect.
> > In the lower pane write
> >
> > | fileStream aFileName |
> > aFileName _ 'SmartTrashCan.morph'.
> >     fileStream _ FileStream newFileNamed: aFileName.
> >     fileStream fileOutClass: self class andObject: self.
> >
> > I send the morph, for see in action drag and drop on any 3.8 or
> newer 
> > and
> > select via file list and load as morph in 3.7 and earlier.
> >
> > This things "eats", all same class Morph on your desk (useful for 
> > puzzles
> > and games).
> >
> > More questions ?
> >
> > Edgar
> >
> > <SmartTrashCan.morph>
> >
> ------------------------------------------------------------------
> Dr. Noury Bouraqadi - Enseignant/Chercheur
> ARMINES - Ecole des Mines de Douai - Dept. G.I.P
> http://csl.ensm-douai.fr/noury
> 
> European Smalltalk Users Group Board
> http://www.esug.org
> 
> Squeak: a Free Smalltalk
> http://www.squeak.org
> ------------------------------------------------------------------
> 
> 
> 
> 
> 
> 




More information about the Squeak-dev mailing list