• 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
Re: Convert Arrays
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Convert Arrays


  • Subject: Re: Convert Arrays
  • From: Dustin Voss <email@hidden>
  • Date: Tue, 21 Oct 2003 16:31:51 -0700

On Tuesday, October 21, 2003, at 10:19 AM, Stiphane Sudre wrote:

myArray=[NSArray arrayWithObjects:@"It",@"s",@"almost",@"written",@"in",@"the",@"documen tation",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.


El Martes, 21 octubre, 2003, a las 05:26 PM, Eivind Andersen escribis:
I wondering how one can convert a NSMutableArray to an NSArray and vice versa.

Can someone help?
_______________________________________________
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: Convert Arrays
      • From: "Alastair J.Houghton" <email@hidden>
References: 
 >Re: Convert Arrays (From: Stéphane Sudre <email@hidden>)

  • Prev by Date: Re: detecting a double click ahead of time
  • Next by Date: [ANN] Path Finder 3.0.1
  • Previous by thread: Re: Convert Arrays
  • Next by thread: Re: Convert Arrays
  • Index(es):
    • Date
    • Thread