• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: NSMutableArrays and Integers
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.

References: 
 >NSMutableArrays and Integers (From: "Hussain Bandukwala" <email@hidden>)

  • Prev by Date: Re: NSMutableArrays and Integers
  • Next by Date: Re: NSMutableArrays and Integers
  • Previous by thread: Re: NSMutableArrays and Integers
  • Next by thread: Re: NSMutableArrays and Integers
  • Index(es):
    • Date
    • Thread