Magma and Classes

Chris Muller asqueaker at gmail.com
Sat Oct 24 05:10:49 UTC 2009


Hi Mirko, the MagmaRepositoryCodeBase is an object which lets you
store your own code into the repository.  If you are compiling classes
dynamically you might want to do something like:

  myMagmaSession commit:
    [ myMagmaSession codeBase fileOutClass: MyDynamicClass ]

To load the class later or by other clients:

  myMagmaSession fileInClassNamed: #MyDynamicClass

Hope this helps.

 - Chris

On Thu, Oct 22, 2009 at 5:58 PM, Mirko Kiefer <mirko.kiefer at arcor.de> wrote:
> Hi,
>
> I am a complete newbie to Magma and currently looking into using it to store
> models including the metamodel. Practically I want to be able to create
> anonymous classes and save these and their instances in a database.
> All created classes are held in a dictionary similar to the Smalltalk
> Dictionary and instances are kept as Collections in class variables. The
> anonymous classes will have methods that need to persisted, as well.
> On the list of supported classes http://wiki.squeak.org/squeak/5722  it says
> that a Class is only referenced by name...
> Is there a way to get around this?
> It would be great if someone could help me with this.
>
> Thanks,
> Mirko
> _______________________________________________
> Magma mailing list
> Magma at lists.squeakfoundation.org
> http://lists.squeakfoundation.org/mailman/listinfo/magma
>


More information about the Magma mailing list