Re: NSArray
Re: NSArray
- Subject: Re: NSArray
- From: steve stout <email@hidden>
- Date: Wed, 22 Jan 2003 20:25:42 -0700
What about objectAtIndex(index) ? You can't store ints in an NSArray
because it's a primitive type, you'll need to store them as Integers
and if you then need an actual int, you can use intValue() on the
Integer.
Also, don't forget to cast the result that's returned from
objectAtIndex(x)... something like (Integer)myarray.objectAtIndex(2)
//steve
On Wednesday, January 22, 2003, at 08:09 PM, John Cassidy wrote:
I am trying to get data out of an NSArray, and have looked at the
class description, but don't see an easy way of getting a single value
out of the NSArray. For instance, I have a bunch of objects in the
array that are all the same class, and I want to pull out a value, and
use it as an int. Any idea of a simple way to do this? Thanks.
John
_________________________________________________________________
MSN 8 helps eliminate e-mail viruses. Get 2 months FREE*.
http://join.msn.com/?page=features/virus
_______________________________________________
webobjects-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/webobjects-dev
Do not post admin requests to the list. They will be ignored.
///---------------------------------------
steve stout
web coordinator
arizona student unions
52o.626.1238
http://www.union.arizona.edu
_______________________________________________
webobjects-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/webobjects-dev
Do not post admin requests to the list. They will be ignored.
References: | |
| >NSArray (From: "John Cassidy" <email@hidden>) |