Mailing Lists: Apple Mailing Lists
Image of Mac OS face in stamp
Re: Alphabetizing an array
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Alphabetizing an array



On 9/30/02 11:17 PM, "Jan Van Tol" <email@hidden> wrote:

> Can someone suggest a way to alphabetize an NSArray (or
> NSMutableArray)?  Alternatively, is there a way to get an NSTableView
> to alphabetize what it displays?  Or better yet, a way to alphabetize
> the keys of an NSDictionary?

-[NSArray sortedArrayUsingSelector:]
-[NSMutableArray sortUsingSelector:]

and related sortUsingFunction:... methods.

-[NSDictionary allKeys] will give you an array of keys, sort them using
above methods.

--
Jeff Hunter
email@hidden
_______________________________________________
studentdev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/studentdev
Do not post admin requests to the list. They will be ignored.

References: 
 >Alphabetizing an array (From: Jan Van Tol <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2011 Apple Inc. All rights reserved.