Re: Passing object graphs bycopy (was: DO, bycopy)
Re: Passing object graphs bycopy (was: DO, bycopy)
- Subject: Re: Passing object graphs bycopy (was: DO, bycopy)
- From: "Rafael K. Kobylinski" <email@hidden>
- Date: Fri, 15 Mar 2002 22:45:55 +0100
At 18:56 Uhr +0100 14.03.2002, Rafael K. Kobylinski wrote:
My first object receives the replacementObjectForPortCoder: message
and returns self, because [encoder isBycopy] returns YES as
expected. Then my encodeWithCoder: method is called, where I send
the encodeObject: message to my second object. My second object then
receives the replacementObjectForPortCoder: message but this time
[encoder isBycopy] surprisingly evaluates to NO.
I was able to work around this issue by implementing
replacementObjectForPortCoder: in the second object with a test
against isByref rather than isBycopy - that way the method always
returns self, unless someone explicitly requests byref. In my app I
always need bycopy anyway so this should work.
I am still interested in any insights on how one is supposed to pass
object graphs bycopy.
--
Rafael K. Kobylinski Email: email@hidden
Institut f|r Informatik Tel. : ++ 49 89 289 22391
Technische Universitdt M|nchen Cell.: ++ 49 177 7 495020
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.