• 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: float[4][3] into NSValue
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


References: 
 >Re: float[4][3] into NSValue (From: Lorenzo <email@hidden>)
 >Re: float[4][3] into NSValue (From: Nick Zitzmann <email@hidden>)
 >Re: float[4][3] into NSValue (From: David Spooner <email@hidden>)
 >Re: float[4][3] into NSValue (From: Ricky Sharp <email@hidden>)

  • Prev by Date: Re: "Cue Sheet Parser" - Use NSString?
  • Next by Date: Re: how to convert int to char with objective c?
  • Previous by thread: Re: float[4][3] into NSValue
  • Next by thread: sizeToFit without actually changing the size?
  • Index(es):
    • Date
    • Thread