Fuel - How to ignore instances of a class
Hi list, I read in the documentation of Fuel that you can implement #fuelAccept: to prevent instances of a class from being serialized, but what I'd like is to ignore those instances, not to raise an error when trying to serialize them. I tried with a visitSubstitution by nil, but it brought big trouble after serializing, materializing and trying to serialize again. Thanks! p.s. Using fuel 1.8.1 loaded from the latest configuration in ss3. -- Bernat Romagosa.
On Fri, Jan 4, 2013 at 9:42 AM, Bernat Romagosa < tibabenfortlapalanca@gmail.com> wrote:
Hi list,
I read in the documentation of Fuel that you can implement #fuelAccept: to prevent instances of a class from being serialized, but what I'd like is to ignore those instances, not to raise an error when trying to serialize them.
I tried with a visitSubstitution by nil, but it brought big trouble after serializing, materializing and trying to serialize again.
Hi Bernat. That should be the way I would do it. Which are the problems? MyClass >> fuelAccept: aGeneralMapper ^ aGeneralMapper visitSubstitution: self by: nil
Thanks!
p.s. Using fuel 1.8.1 loaded from the latest configuration in ss3.
-- Bernat Romagosa.
-- Mariano http://marianopeck.wordpress.com
None right now.. I don't understand what happened a while ago. It's working now, I'll come back if it happens again. Thanks! :) 2013/1/4 Mariano Martinez Peck <marianopeck@gmail.com>
On Fri, Jan 4, 2013 at 9:42 AM, Bernat Romagosa < tibabenfortlapalanca@gmail.com> wrote:
Hi list,
I read in the documentation of Fuel that you can implement #fuelAccept: to prevent instances of a class from being serialized, but what I'd like is to ignore those instances, not to raise an error when trying to serialize them.
I tried with a visitSubstitution by nil, but it brought big trouble after serializing, materializing and trying to serialize again.
Hi Bernat. That should be the way I would do it. Which are the problems?
MyClass >> fuelAccept: aGeneralMapper ^ aGeneralMapper visitSubstitution: self by: nil
Thanks!
p.s. Using fuel 1.8.1 loaded from the latest configuration in ss3.
-- Bernat Romagosa.
-- Mariano http://marianopeck.wordpress.com
-- Bernat Romagosa.
participants (2)
-
Bernat Romagosa -
Mariano Martinez Peck