Re: plist -> popup menu
Re: plist -> popup menu
- Subject: Re: plist -> popup menu
- From: Paolo Manna <email@hidden>
- Date: Sat, 17 May 2003 14:41:44 +0200
The problem is the order of the items in the popup. In the Property
List
Editor they are ordered alphabetically, but in the popup they are not.
This because NSDictionary uses a hash mechanism, thus the order the
items (or better, the keys) are stored depends on the hash value...
Is there a way I can control the order of the items in the popup?
Instead of an NSArray, use NSMutableArray, and then sort it (either
-sortUsingFunction:context: or -sortUsingSelector:): alternatively, you
can use the sorting functions of NSArray, but this means creating 2 of
them...
Cheers
Paolo
_______________________________________________
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.