• 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
Bug? ".keyboard" NSString returned from [NSFontManager availableFonts]?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Subject: Bug? ".keyboard" NSString returned from [NSFontManager availableFonts]?
  • From: Dale Gillard <email@hidden>
  • Date: Tue, 29 Jan 2002 22:32:35 +1100

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
-----------------


  • Follow-Ups:
    • Re: Bug? ".keyboard" NSString returned from [NSFontManager availableFonts]?
      • From: Raphael Sebbe <email@hidden>
  • Prev by Date: Re: theoretical idea - would this work?
  • Next by Date: Re: theoretical idea - would this work?
  • Previous by thread: Re: NSKeyValueCoding tips
  • Next by thread: Re: Bug? ".keyboard" NSString returned from [NSFontManager availableFonts]?
  • Index(es):
    • Date
    • Thread