• 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
font panel delegate
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

font panel delegate


  • Subject: font panel delegate
  • From: "Gerriet M. Denkmann" <email@hidden>
  • Date: Sun, 13 Oct 2002 14:57:36 +0200

In some class (subclass of NSObject) I have these two methods:

- (void)start
{
id sharedFontManager = [ NSFontManager sharedFontManager ];
id sharedFontPanel = [ NSFontPanel sharedFontPanel ];

// Before the NSFontPanel adds a particular font family or face to its
list,
// the NSFontPanel asks its delegate to confirm the addition by
sending
// the delegate a fontManagerWillIncludeFont message.
// this is the delegate of the font panel, right?

// NSFontPanel does not have delegate methods, but NSFontManager has

// the documentation is not very clear, what to do, so I do both:
[ sharedFontManager setDelegate: self ] ;
[ sharedFontPanel setDelegate: self ] ;

// Triggers a reload to the default state, so that the delegate will
be called.
// This provides the delegate opportunity to scrutinize the default
list of
// fonts to be displayed in the panel
[ sharedFontPanel reloadDefaultFontFamilies ];

[ sharedFontPanel orderFront: self ];
}

- (BOOL)fontManager:(id)theFontManager willIncludeFont:(NSString
*)fontName
{
NSLog(@"fontManagerWillIncludeFont" );
return YES ;
}

The problem is that fontManagerWillIncludeFont is never called.
What am I doing wrong?

Gerriet.
_______________________________________________
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.

  • Prev by Date: OT: Mail.app
  • Next by Date: Re: [aTask setLaunchPath:@MYLOCALOBJECTIVECROUTINE]
  • Previous by thread: Re: Newbie: app cursors and icons
  • Next by thread: Bug in tableColumnWithIdentifier: ?
  • Index(es):
    • Date
    • Thread