Skip navigation.
 
mlRe: float[4][3] into NSValue
FROM : Ricky Sharp
DATE : Tue Nov 20 22:42:54 2007

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_removed>
Instant Interactive(tm)  http://www.instantinteractive.com

Related mailsAuthorDate
mlfloat[4][3] into NSValue Lorenzo Nov 20, 20:16
mlRe: float[4][3] into NSValue Hank Heijink Nov 20, 20:37
mlRe: float[4][3] into NSValue Paul Sargent Nov 20, 20:37
mlRe: float[4][3] into NSValue Allen Smith Nov 20, 20:57
mlRe: float[4][3] into NSValue Paul Sargent Nov 20, 20:59
mlRe: float[4][3] into NSValue Lorenzo Nov 20, 21:14
mlRe: float[4][3] into NSValue Nick Zitzmann Nov 20, 21:32
mlRe: float[4][3] into NSValue David Spooner Nov 20, 21:50
mlRe: float[4][3] into NSValue Ricky Sharp Nov 20, 22:42
mlRe: float[4][3] into NSValue David Spooner Nov 21, 01:04