Re: Convert Arrays
Re: Convert Arrays
- Subject: Re: Convert Arrays
- From: "Alastair J.Houghton" <email@hidden>
- Date: Wed, 22 Oct 2003 10:34:36 +0100
On Wednesday, October 22, 2003, at 12:31 am, Dustin Voss wrote:
On Tuesday, October 21, 2003, at 10:19 AM, Stiphane Sudre wrote:
myArray=[NSArray
arrayWithObjects:@"It",@"s",@"almost",@"written",@"in",@"the",@"docume
ntation",nil];
myMutableArray=[[myArray mutableCopy] autorelease];
myArray=[NSArray arrayWithArray: myMutableArray];
myArray = [myMutableArray copy];
would also work. The "copy" method does immutable copies, if the class
in question has the concept of immutable vs. mutable.
Although you need to remember to autorelease it if you want the same
effect as the other statements above.
Kind regards,
Alastair.
_______________________________________________
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.