• 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
arrayWithObjects question
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

arrayWithObjects question


  • Subject: arrayWithObjects question
  • From: Hisaoki Nishida <email@hidden>
  • Date: Tue, 23 Jul 2002 19:42:59 -0400

Hi,

I have a newbie question with arrays.
I want to add to an NSArray a number of objects of the same type.
The contents don't have to be removed/added, but I need to modify some instance variables in the objects in the array. I could just do:


myArray = [NSArray arrayWithObjects: [MyObject object],
[MyObject object],
[MyObject object],
..., // X number of MyObject objects
nil];

But I need a lot of my MyObject objects, and doing this manually would take lots of space.
What do I use in this case? I couldn't find any method that does this in NSArray reference doc.

Thank you.

-Yuki
_______________________________________________
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.

  • Follow-Ups:
    • Re: arrayWithObjects question
      • From: Brent Gulanowski <email@hidden>
    • Re: Re: arrayWithObjects question
      • From: email@hidden
    • Re: arrayWithObjects question
      • From: email@hidden
  • Prev by Date: Re: Subclassing NS(Mutable)Dictionary
  • Next by Date: Re: Creating an automatic build number with PBX?
  • Previous by thread: Re: How to find icon file path?
  • Next by thread: Re: arrayWithObjects question
  • Index(es):
    • Date
    • Thread