• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Bug? ".keyboard" NSString returned from [NSFontManager availableFonts]?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Bug? ".keyboard" NSString returned from [NSFontManager availableFonts]?


  • Subject: Re: Bug? ".keyboard" NSString returned from [NSFontManager availableFonts]?
  • From: Raphael Sebbe <email@hidden>
  • Date: Tue, 29 Jan 2002 12:48:09 +0100

AFAIK, that (hidden) font is used to display keyboard symbols (up arrow for SHIFT, empty apple for COMMAND...). And this is not a bug !

Raphael

On Tuesday, January 29, 2002, at 12:32 PM, Dale Gillard wrote:

Hi all

This is one of my first posts to this list. Please be gentle ;-)

I'm loading a PopUpButton with a string array of the fonts available to the user. Strangely, the 1st string in the array returned by [NSFontManager availableFonts] is ".keyboard". Isn't this an invisible Darwin file that contains the user's keyboard layout?

Assuming this to be a bug, but before getting carried away with Apple's bugreporter, I thought I'd better run this by some experts (especially considering I'm new to Cocoa!). NB I've done a Project Builder 'find', searched Apple's dev web site, and had a look thru Learning Cocoa (not that I expected anything would be there) searching for the word ".keyboard". But I either didn't find anything about the ".keyboard" file, or got a whole bunch of results about "keyboard" (ie no period at the start of the word).

I'd appreciate it if anyone could tell me if this a known bug in Cocoa/NSFontManager? Poor use of the Cocoa API on my part? (The code follows) Or just a known issue I'll need to work around?

Many thanks
Dale Gillard

-----------------
// Begin code showing partial implementation of Controller class.

#import "MyController.h"
implementation MyController

- (void)awakeFromNib
{
NSFontManager *fontManager = [NSFontManager sharedFontManager];
NSArray *theFonts = [[fontManager availableFonts]
sortedArrayUsingSelector:@selector(compare:)];
[fontPopUpButton removeAllItems];
[fontPopUpButton addItemsWithTitles:theFonts];
}

@end
-----------------
_______________________________________________
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.


References: 
 >Bug? ".keyboard" NSString returned from [NSFontManager availableFonts]? (From: Dale Gillard <email@hidden>)

  • Prev by Date: Re: theoretical idea - would this work?
  • Next by Date: RE: Springs and struts with splitview
  • Previous by thread: Bug? ".keyboard" NSString returned from [NSFontManager availableFonts]?
  • Next by thread: Color swatch in NSMenuItem
  • Index(es):
    • Date
    • Thread