• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Problems with Distributed Objects
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.


References: 
 >Re: Problems with Distributed Objects (From: Philippe Mougin <email@hidden>)

  • Prev by Date: Animated GIF (repost)
  • Next by Date: Re: Setting windows attrubutes to use applicationShouldTerminateAfterLastWindowClosed:
  • Previous by thread: Re: Problems with Distributed Objects
  • Next by thread: Tuning KVO validation.
  • Index(es):
    • Date
    • Thread