Re: float[4][3] into NSValue
Re: float[4][3] into NSValue
- Subject: Re: float[4][3] into NSValue
- From: David Spooner <email@hidden>
- Date: Tue, 20 Nov 2007 17:04:05 -0700
Yes. I my statement was in reference to NSValue, not NSData. Sorry
for the confusion.
dave
On 20-Nov-07, at 2:42 PM, Ricky Sharp wrote:
On Nov 20, 2007, at 2:50 PM, David Spooner wrote:
If you use NSArchiver/NSUnarchiver then you'll be fine between ppc/
intel. Unfortunately, as noted in the recent thread "How to
archive structs like NSRect", NSKeyedArchiver does not support
coding of NSValues with non-trivial types. A workaround was also
proposed in that thread.
Be careful with that first statement. It is true that if one uses
primitive types with NSArchiver and friends, that byte-swapping is
handled for you. But, once you start to archive blobs of data (e.g.
NSData containing a structure with 2-byte, 4-byte, etc. fields),
you'll need to handle byte-swapping yourself.
FWIW, I've never yet used NSValue objects to wrap things for
archiving. I've only ever used NSData. Not saying that's the
proper/only solution, but it hasn't failed me yet.
___________________________________________________________
Ricky A. Sharp mailto:email@hidden
Instant Interactive(tm) http://www.instantinteractive.com
_______________________________________________
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