[Distant Objects] Problem passing custom objects bycopy
[Distant Objects] Problem passing custom objects bycopy
- Subject: [Distant Objects] Problem passing custom objects bycopy
- From: Oleg Krupnov <email@hidden>
- Date: Mon, 18 Oct 2010 18:46:58 +0300
Hi,
I have a server and a client processes running on the same machine.
Per client request, the server does some job and returns the result to
the client in form of some MyObject.
This is the interface vended by the server:
- (out bycopy MyObject*)doSomeJob;
Despite bycopy, I see in debugger that instead of a copy, a proxy is returned.
Allright, I've read in this list that in order to make work, I also
need to override -replacementObjectForPortCoder: and I did this:
// in MyObject
- (id)replacementObjectForPortCoder:(NSPortCoder*)encoder
{
if ([encoder isBycopy])
{
NSLog(@"replace by copy!!!")
return self;
}
return [super replacementObjectForPortCoder:encoder];
}
In this case, I see the "replace by copy!!!" string in the console,
but then the server process seems to hang and become unresponsive.
-[MyObject encodeWithCoder:] does not get called.
What am I doing wrong?
Thanks!
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden