On Sun, Aug 21, 2011 at 10:32 AM, Lukas Renggli <renggli@gmail.com> wrote:
Hi Mariano,

> Hi Lukas. I was serializing Pier kernels with Fuel and I started to face
> problems with Magritte proxies. Since I have no idea how/why they are use, I
> need to ask a couple of question. Imagine I want to serialize a graph (like
> a Pier kernel) that contains instances of MADynamicObject, like
>
>  MAMultipleOptionDescription new
>         default: [ self defaultViewClasses ] magritteDynamicObject;
>         options: [ self defaultViewClasses ] magritteDynamicObject;
> ....

The reason to have them is to allow Magritte to cache the description
instances, while certain properties can still adapt to the model.


Ok, I understand.
 
> So the questions are:
>
> - When I MATERIALIZE the graph, would you like to
> a) still have the proxies exactly as it was during serialization ?
> b) or would you expect that objects refer directly to the target of the
> proxy (proxies do not even exist) ?

It doesn't really matter because the descriptions that end up part of
the model are just there to identify a certain described value. The
description itself is not used other than to compare it with other
descriptions. So the best is probably if you just nil the proxies on
serialization.

Excellent!!! that worked out of the box with the just developed hook by Martin in Fuel. I can now do:

MADynamicObject >> fuelAccept: aVisitor 
    ^ aVisitor visitSubstitution: self


MADynamicObject >> fuelSubstitution 
    ^ nil

And that's all :)

Thanks Lukas.

 

Lukas


--
Lukas Renggli
www.lukas-renggli.ch

_______________________________________________
Magritte, Pier and Related Tools ...
https://www.iam.unibe.ch/mailman/listinfo/smallwiki



--
Mariano
http://marianopeck.wordpress.com