• 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: NSFontPanelValidation broken?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSFontPanelValidation broken?


  • Subject: Re: NSFontPanelValidation broken?
  • From: Quincey Morris <email@hidden>
  • Date: Thu, 11 Jun 2009 21:12:18 -0700

On Jun 11, 2009, at 20:20, David Reitter wrote:

Why does the following not have the desired effect?

- (unsigned int) validModesForFontPanel:(NSFontPanel *)fontPanel
{
 /* This doesn't work as intended.  Why?  Bug? */
 return (NSFontPanelFaceModeMask |
 	  NSFontPanelSizeModeMask |
 	  NSFontPanelCollectionModeMask  |
 	  NSFontPanelTextColorEffectModeMask  |
 	  NSFontPanelDocumentColorEffectModeMask);

}

I can't seem to show the color buttons explicitly, and removing, for instance, NSFontPanelStrikethroughEffectModeMask or NSFontPanelUnderlineEffectModeMask simply doesn't work right (usually, an underline popup is shown in the panel, but the text color effect button is hidden).

Is NSFontPanel simply buggy even in 10.5, or am I missing something here?

This works as designed:

return  NSFontPanelAllModesMask    - NSFontPanelShadowEffectModeMask;

but of course that's not really what I want to do.

FWIW, your return type is wrong -- it should be NSUInteger, though that wouldn't make a difference unless your app was 64-bit.



_______________________________________________

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


References: 
 >NSFontPanelValidation broken? (From: David Reitter <email@hidden>)

  • Prev by Date: Re: UINavigationController for desktop Cocoa?
  • Next by Date: NSView directly drawn on screen?
  • Previous by thread: NSFontPanelValidation broken?
  • Next by thread: NSView directly drawn on screen?
  • Index(es):
    • Date
    • Thread