FROM : David Spooner
DATE : Tue Nov 20 21:50:11 2007
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.
dave
On 20-Nov-07, at 1:32 PM, Nick Zitzmann wrote:
>
> On Nov 20, 2007, at 1:14 PM, Lorenzo wrote:
>
>> Thank you Allen, it worked like a charm. And this is a great news.
>> I can now store a lot of data in a single line. I suppose this is
>> endian-safe. It will work on Intel ad PPC. Right?
>> I mean, I can write values on Intel and read values on PPC and
>> viceversa,
>> right?
>
>
> Due to endian differences between the architectures, I would not
> make that assumption. Instead, I would swap the values from the
> host to either big-endian or little-endian before saving/sending/
> etc. and then swap them back upon loading/receiving/etc.
>
> Nick Zitzmann
> <http://www.chronosnet.com/>
>
DATE : Tue Nov 20 21:50:11 2007
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.
dave
On 20-Nov-07, at 1:32 PM, Nick Zitzmann wrote:
>
> On Nov 20, 2007, at 1:14 PM, Lorenzo wrote:
>
>> Thank you Allen, it worked like a charm. And this is a great news.
>> I can now store a lot of data in a single line. I suppose this is
>> endian-safe. It will work on Intel ad PPC. Right?
>> I mean, I can write values on Intel and read values on PPC and
>> viceversa,
>> right?
>
>
> Due to endian differences between the architectures, I would not
> make that assumption. Instead, I would swap the values from the
> host to either big-endian or little-endian before saving/sending/
> etc. and then swap them back upon loading/receiving/etc.
>
> Nick Zitzmann
> <http://www.chronosnet.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

