Re: initialize an NSArray with a list of objects
Re: initialize an NSArray with a list of objects
- Subject: Re: initialize an NSArray with a list of objects
- From: Joshua Scott Emmons <email@hidden>
- Date: Tue, 16 May 2006 18:01:19 -0500
Is there a way to initialize an NSArray with a list of strings like
I can do in C
the C way
char * myList[] = {"item1", "item2", "item3" }
The first thing that comes to mind is:
NSArray *myArray = [NSArray arrayWithObjects:@"item1", @"item2",
@"item3", nil];
It seems unlikely that there would be an operator (like {}) that
would create cocoa collection objects grafted into objc.
Cheers,
-Joshua Emmons
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden