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;
....
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) ?
If you want a) then there are problems that I have to fix because for
example I put objects (proxies) in a IdentitySet/IdenitityDictionary (which
of course #== is not intercepted by the proxy) but then when I do
#instVarAt: or #basicAt: etc, from the serializer, it intercept the messages
and forwards to the target. This makes things complicated in Fuel but we can
solve it.
b) can be achieved with the hook of a #objectToSerialize where each class
can implement such message and not necessary answer self but something
different. In this case, the proxy can answer the target.
So....depending what is the best scenario for the materialization, I can
choose which of the options to do.
Thanks in advance,
--
Mariano
http://marianopeck.wordpress.com