On 13.06.2011 19:16, Mariano Martinez Peck wrote:
On Thu, Jun 9, 2011 at 3:35 AM, Eliot Miranda <eliot.miranda@gmail.com <mailto:eliot.miranda@gmail.com>> wrote:
Hi Martin and Mariano,
a couple of questions. What's the right way to exclude certain objects from the serialization? Is there a way of excluding certain inst vars from certain objects?
Eliot and the rest....Martin implemented this feature in Fuel-MartinDias.258. For the moment, we decided to put #fuelIgnoredInstanceVariableNames at class side.
Behavior >> fuelIgnoredInstanceVariableNames "Indicates which variables have to be ignored during serialization."
^#()
MyClass class >> fuelIgnoredInstanceVariableNames ^ #('instVar1')
The impact in speed is nothing, so this is good. Now....we were thinking if it is common to need that 2 different instances of the same class need different instVars to ignore. Is this common ? do you usually need this ? We checked in SIXX and it is at instance side. Java uses the prefix 'transient' so it is at class side...
thanks
-- Mariano http://marianopeck.wordpress.com
You can have variables on both instances and classes. I believe in SIXX you send #sixxIgnorableInstVarNames to the object you want to serialize. IE. on class side you define ignorable class instance variables, while on instance side you define ignorable instance variables. Cheers, Henry