Archiving NSColor as NSData
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