• 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
Archiving NSColor as NSData
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Archiving NSColor as NSData


  • Subject: Archiving NSColor as NSData
  • From: Rein Hillmann <email@hidden>
  • Date: Tue, 12 Aug 2008 23:26:20 +0200

Hi,

Disclaimer: this is a question from a newbie.

Could someone please explain why an NSColor yields so much data when archived to NSData?

For example, the following code:

NSColor* color = [NSColor yellowColor];
NSData* colorAsData = [NSArchiver archivedDataWithRootObject:color];
NSLog(@"colorAsData: %@", colorAsData);

yields the output:

colorAsData: <040b7374 7265616d 74797065 6481e803 84014084 8484074e 53436f6c 6f720084 84084e53 4f626a65 63740085 84016301 84046666 66660101 000186>

I suspect it's archiving other ivars in the color object. If so, is this much data in a single color object not a little extreme?

Thanks,
Rein
_______________________________________________

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


  • Follow-Ups:
    • Re: Archiving NSColor as NSData
      • From: Phil <email@hidden>
    • Re: Archiving NSColor as NSData
      • From: "Shawn Erickson" <email@hidden>
    • Re: Archiving NSColor as NSData
      • From: Jim Correia <email@hidden>
  • Prev by Date: Re: Generate back trace programmatically?
  • Next by Date: Re: Accessing memory of another application?
  • Previous by thread: Cocoaheads Lake Forest will be an NSCoder-style get together at a DIFFERENT meeting place tomorrow
  • Next by thread: Re: Archiving NSColor as NSData
  • Index(es):
    • Date
    • Thread