• 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: Array sorting problem
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Array sorting problem


  • Subject: Re: Array sorting problem
  • From: Matt Ridley <email@hidden>
  • Date: Thu, 10 May 2001 22:43:23 +0100

On Thursday, May 10, 2001, at 09:38 pm, Richard Kiss wrote:

or if you really need the array to be mutable,

NSMutableArray *tempArray;
tempArray = [NSMutableArray arrayWithArray:[[items allKeys]
sortedArrayUsingSelector:@selector(compare:)]];

That's exactly what I did. I do need it to be mutable, since I'm adding a few items afterwards (the dictionary is holding NSToolbarItems, and I wanted to sort a specific set of them then add some others at the end of the list, so they'd show that way in the Customize Toolbar panel). It's all working like a charm.


Thanks,
-Matt

--
Matt Ridley
<http://www.mattridley.com/>


  • Prev by Date: Re: NSButton with an image
  • Next by Date: CodeWarrior and Cocoa
  • Previous by thread: Re: Array sorting problem
  • Next by thread: Re: NSButton with an image
  • Index(es):
    • Date
    • Thread