Re: Problems with DO
Re: Problems with DO
- Subject: Re: Problems with DO
- From: Matt Massicotte <email@hidden>
- Date: Mon, 23 Dec 2002 17:28:28 -0500
Yeah, my object conforms to NSCoding, that's how I get NSArchiver to
work. It also conforms to NSCopying, though that method is never
called.
I just looked at the docs for -replacementObjectForPortCoder:, that's
exactly was the problem is! It explains very clearly why I've been
having all my problems! If anyone reading this has any pull with the
Cocoa doc writers, please please please make this more clear in the DO
docs!
Thank you,
Matt
On Monday, December 23, 2002, at 04:54 PM, Mike Ferris wrote:
If an object will go "bycopy" across the wire in DO, it has to conform
to the NSCoding protocol (which is the same protocol used by the
archiving stuff). Do your objects conform to NSCoding?
It is possible you might also have to implement
-replacementObjectForPortCoder: to return self if [coder isByCopy]
returns YES, but I can't remember right now if this is actually
required.
Mike
Begin forwarded message:
From: Matt Massicotte <email@hidden>
Date: Mon Dec 23, 2002 1:09:46 PM US/Pacific
To: email@hidden
Subject: Problems with DO
Hi everyone,
Put a question up to the list about a month ago concerning some
strange behaviour with DO. My original problem was that if I passed
an NSString or NSNumber, or an NSArray of those objects, everything
worked, but my own objects didn't survive the trip across the >> network.
Someone replied, saying that they had a similar problem, and that
explicitly using NSArchiver and NSUnarchiver solved their problem. I
tried, and it worked for me too. I find this puzzling because DO's
documentation gave me the impression that this was automatically
done. Anyways...
Now, my problem is that a method that returns (bycopy id) is
returning objects that respond YES to [obj isProxy]. What am I
missing here? I thought that bycopy will produce a copy of the
object in the calling processes space. I am sure that I'm somehow
implementing things wrong, but I can't find a problem. Has anyone
else see anything like this?
Matt Massicotte
email@hidden
_______________________________________________
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.
_______________________________________________
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.