Re: Problems with Distributed Objects
Re: Problems with Distributed Objects
- Subject: Re: Problems with Distributed Objects
- From: Andreas Mayer <email@hidden>
- Date: Thu, 26 Feb 2004 22:00:05 +0100
Am 26.02.2004 um 21:16 schrieb Philippe Mougin:
In the encodeWithCoder: method of your custom object, instead of asking
your image to encode itself, get the data out of your image into an
NSData object (for instance, using the TIFFRepresentation method). Then
encode this NSData object instead of your image. By default, NSData
objects pass themselves by value over a distributed object connection.
In your initWithCoder: decode the NSData object and construct a new
NSImage object with it (using the initWithData: method).
That's exactly what I ended up with. And it works fine. :)
Another solution, [...]
I like the first solution better, because the server needs to work with
the object and I think it's better if I transfer it once and use the
copy from there on.
Andreas
_______________________________________________
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.