Re: NSMutableArrays and Integers
Re: NSMutableArrays and Integers
- Subject: Re: NSMutableArrays and Integers
- From: Esteban Uribe <email@hidden>
- Date: Mon, 17 Mar 2003 00:26:05 -0800
Hi,
On Sunday, March 16, 2003, at 11:26 PM, Hussain Bandukwala wrote:
Hello All,
Is it possible to add integer values to an NSMutableArray object? I in
particular, would like to add the counter of a for loop in the
NSMutableArray object. I tried to convert the integer into its
charValue, string value, as well as added another integer counter that
moves 1:1 with the for loop counter, but all efforts were in vain.
Could someone please guide me? Would these added integer values be
obtained by the method, [receiver objectAtIndex: index]?
You can put the integer value in an NSNumber then add that instance to
you NSMutableArray.
NSMutableArray will take in any subclasses of NSObject...but not
standard C types.
-Esteban
_______________________________________________
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.