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 _______________________________________________ Magritte, Pier and Related Tools ... https://www.iam.unibe.ch/mailman/listinfo/smallwiki |
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. > 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. Lukas -- Lukas Renggli www.lukas-renggli.ch _______________________________________________ Magritte, Pier and Related Tools ... https://www.iam.unibe.ch/mailman/listinfo/smallwiki |
On Sun, Aug 21, 2011 at 10:32 AM, Lukas Renggli <[hidden email]> wrote: Hi Mariano, Ok, I understand.
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.
-- Mariano http://marianopeck.wordpress.com _______________________________________________ Magritte, Pier and Related Tools ... https://www.iam.unibe.ch/mailman/listinfo/smallwiki |
Free forum by Nabble | Edit this page |