3

I have an NSPopUpButton with Inline Button style. When mouse enters, exits or mouse down or mouse up, it logs "Unknown bezel style 15 and/or control size 1"

15 is the NSInlineButtonStyle from NSButtonCell.h

typedef NS_ENUM(NSUInteger, NSBezelStyle) {
    NSRoundedBezelStyle          = 1,
    NSRegularSquareBezelStyle    = 2,
    NSThickSquareBezelStyle      = 3,
    NSThickerSquareBezelStyle    = 4,
    NSDisclosureBezelStyle       = 5,
    NSShadowlessSquareBezelStyle = 6,
    NSCircularBezelStyle         = 7,
    NSTexturedSquareBezelStyle   = 8,
    NSHelpButtonBezelStyle       = 9,
    NSSmallSquareBezelStyle       = 10,
    NSTexturedRoundedBezelStyle   = 11,
    NSRoundRectBezelStyle         = 12,
    NSRecessedBezelStyle          = 13,
    NSRoundedDisclosureBezelStyle = 14,
    // The inline bezel style contains a solid round-rect border background. It can be used to create an "unread" indicator in an outline view, or another inline button in a tableview, such as a stop progress button in a download panel. Use text for an unread indicator, and a template image for other buttons.
    NSInlineBezelStyle NS_ENUM_AVAILABLE_MAC(10_7) = 15,

    NSSmallIconButtonBezelStyle NS_ENUM_DEPRECATED_MAC(10_0, 10_0) = 2 // This bezel style is obsolete and should not be used.
};

Oddly, everything compiles fine, and I set the style in Interface Builder. Everything also works fine except for this console spew.

I was unable to find anything in the docs or the headers for NSButton, NSPopUpButton, NSButtonCell, NSPopUpButtonCell, NSMenuItemCell that warn or prohibit this style. And the size is set by constraints with no auto layout issues logged.

The spew to the console does not contain any indicator of where this message comes from. I can only tell by observed behavior.

Unknown bezel style 15 and/or control size 1

Is there a way to silence this?

uchuugaka
  • 12,679
  • 6
  • 37
  • 55
  • What OS version are you running? What other settings are on the button? I can't reproduce this under the latest Mavericks beta. – Wil Shipley Jan 08 '14 at 09:44
  • Current production Mavericks. Not the current beta. Perhaps that means it's fixed in next software update build. I haven't tried setting it in code, but setting the inline button style in IB certainly reproduces in a small test app. – uchuugaka Jan 08 '14 at 09:50
  • I created a XIB and I dragged an inline button from the palette and set its size to 'small', then ran the empty app and moused over and clicked on it. No logs—I'm on 13C32. (Of course, it's incredibly annoying the "size" doesn't matter in inline buttons.) – Wil Shipley Jan 08 '14 at 09:53
  • Yeah they're weird. But this is specifically an NSPopUpButton set to the inline button style. Not a regular NSButton. – uchuugaka Jan 08 '14 at 10:05
  • Oh, yah, it hates that. You found a bug! Time to file a RADAR. – Wil Shipley Jan 08 '14 at 10:28
  • 1
    Under way... Thanks for confirming. – uchuugaka Jan 08 '14 at 10:29
  • Still happening in Xcode 11.2.1. I'm probably the only person still using NSInlineButtonStyle. – gheclipse Nov 19 '19 at 15:49

1 Answers1

1

Currently it seems to be a bug.

uchuugaka
  • 12,679
  • 6
  • 37
  • 55