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
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 mails | Author | Date |
|---|---|---|
| Lorenzo | Nov 20, 20:16 | |
| Hank Heijink | Nov 20, 20:37 | |
| Paul Sargent | Nov 20, 20:37 | |
| Allen Smith | Nov 20, 20:57 | |
| Paul Sargent | Nov 20, 20:59 | |
| Lorenzo | Nov 20, 21:14 | |
| Nick Zitzmann | Nov 20, 21:32 | |
| David Spooner | Nov 20, 21:50 | |
| Ricky Sharp | Nov 20, 22:42 | |
| David Spooner | Nov 21, 01:04 |






Cocoa mail archive

