Re: Re: arrayWithObjects question
Re: Re: arrayWithObjects question
- Subject: Re: Re: arrayWithObjects question
- From: email@hidden
- Date: Tue, 23 Jul 2002 20:12:25 -0400
(In response to my last post)
If you must have an NSArray (instead of an NSMutableArray), simply
convert it:
NSArray* array = [NSArray arrayWithArray: myArray];
(where myArray is the mutable array).
On Tuesday, July 23, 2002, at 07:42 PM, Hisaoki Nishida wrote:
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.
_______________________________________________
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.