RE: newbie q's - Storing arrays of non-objects
RE: newbie q's - Storing arrays of non-objects
- Subject: RE: newbie q's - Storing arrays of non-objects
- From: Oliver Donald <email@hidden>
- Date: Wed, 29 Jan 2003 10:50:42 -0000
That is how I began, but I had an array of arrays of NSNumbers and it was
nasty looking doing something like:
theID = [[[mySymbolArray objectAtIndex:theSymbol] objectAtIndex:theElement]
longValue];
looking at it now it isn't so bad...
thanks!
-----Original Message-----
From: Guy Jonathan [
mailto:email@hidden]
Sent: Wednesday, January 29, 2003 10:42 AM
To: 'Oliver Donald'; Cocoa Development List
Subject: RE: newbie q's - Storing arrays of non-objects
You could store them as NSNumbers using [NSNumber numberWithLong:] or is
this not an option?
Jonathan Guy
-----Original Message-----
From: Oliver Donald [
mailto:email@hidden]
Sent: 29 January 2003 10:30
To: Cocoa Development List
Subject: newbie q's - Storing arrays of non-objects
Hi,
Im writing some software where I need to store an array of 'symbols', where
each symbol is an array of 3-8 Long's. As far as I can tell I cant have an
NSArray of long[]'s because they aren't objects and dont have
reference-counts etc etc. So at the moment I am storing each symbol in an
NSData object, but this feels a bit heavy handed, especially when it comes
to reading out 4 bytes at a time to get a long.
Is there a better way to do this? What is the best way to store arrays of
non-objects? (ps is non-object = atomic ?)
Thanks
oli
DISCLAIMER: The information contained in this e-mail is confidential and may
be privileged. It is intended for the addressee only. If you are not the
intended recipient, please delete this e-mail immediately.
The contents of this email must not be disclosed or copied without the
sender's consent. We cannot accept any responsibility for viruses, so please
scan all attachments.
The statements and opinions expressed in this message are those of the
author and do not necessarily reflect those of the company. The company does
not take any responsibility for the views of the author.
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.