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 protected])

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [email protected]

Reply via email to