Sorting a NSMutableArray

Given a NSMutableArray

   set my IDArray to current application's NSMutableArray's alloc()'s init()
   my IDArray's setArray_(myASList)

is there a simple way to sort it? It only contain integer values, I’ve read that NSNumber and NSString have a “compare” method…

Use the instance method sortUsingSelector_(“compare:”).

Once again, thank you! Now all I have to do is to change the 1-indexing of Applescript to the 0-indexing of Cocoa :slight_smile:

ApplescriptObjC ability to take advantage of such a rich and a complex framework is fantastic - I really enjoy it!

Happy coding!