Re: Two dimensional array
Re: Two dimensional array
- Subject: Re: Two dimensional array
- From: Ben Dougall <email@hidden>
- Date: Thu, 13 Nov 2003 23:21:43 +0000
NSArray *root, *one, *two, *three, *four, *five;
one = [[NSArray alloc] initWithObjects: @"a", @"b", @"c", @"d", @"e",
nil];
two = [[NSArray alloc] initWithObjects: @"f", @"g", @"h", @"i", @"j",
nil];
....
root = [[NSArray alloc] initWithObjects: one, two, three, four, five,
nil];
also you could get rid of the contained array pointers buy doing:
NSArray *root;
root = [[NSArray alloc] initWithObjects:
[[NSArray alloc] initWithObjects: @"a", @"b", @"c", @"d", @"e", nil],
[[NSArray alloc] initWithObjects: @"f", @"g", @"h", @"i", @"j", nil],
...
nil ];
_______________________________________________
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.