Re: NSPopupButton to display fonts in the fonts themselves
Re: NSPopupButton to display fonts in the fonts themselves
- Subject: Re: NSPopupButton to display fonts in the fonts themselves
- From: "I. Savant" <email@hidden>
- Date: Wed, 8 Jul 2009 09:33:26 -0400
On Jul 8, 2009, at 9:26 AM, Graham Cox wrote:
[NSMenuItem setAttributedTitle:];
... and if you want to get really fancy (ie "modern"), you could
build the list with regular strings (just "setTitle:") relatively, but
use NSOperation/Queue to create / set the attributed titles with the
actual fonts in the background, replacing the plain-text ones.
I suggest this because grabbing a list of font name strings is
quicker than building an attributed string for each font. Do the quick
thing first so it's available, but do the longer fancy thing in the
background, updating while the UI is idling. Remember (99.9% of) all
AppKit-related stuff should be done on the main thread.
--
I.S.
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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:
This email sent to email@hidden