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 (Cocoa-dev@lists.apple.com)

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to