On 31 Mar 2012, at 7:53 PM, Seth Willits wrote:

> On Mar 31, 2012, at 5:29 PM, Fritz Anderson wrote:
> 
>> +[NSWorkspace fileLabelColors] returns the available label colors in the 
>> same order as the index.
>> 
>> What I'd really like is to use the same order as appears in the preferences, 
>> and in the File/contextual menu. That is, I'd like to conform to Apple's 
>> interface. Is this possible?
> 
> Why wouldn't it be? Just display them in the same order as Finder and don't 
> rely on the display index being the same as the label index you use in the 
> assignment. I don't really see the problem. (I've done this.)

Hard-coding the order works in practice — most of the time. Unless I much 
mistake, it doesn't work in principle. Users can change colors and label names, 
and I know of no way to sort colors or names to match what's in the Finder 
preferences. Maybe the permutation of the indices is fixed, but I'd be more 
comfortable if the permutation were documented.

        — F


_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to