13

I have re-drawn the NSWindow, and now when I start my app there is a warning in the console that says NSWindow does not support utility styleMask 0x10. How can I get rid of this warning?

Any idea?

Thanks!

enter image description here

lnafziger
  • 25,760
  • 8
  • 60
  • 101
Blues Zhou
  • 306
  • 2
  • 16
  • Are you sure it said `0x10` and not `0x1000`? – Peter Hosey Dec 18 '12 at 22:47
  • 1
    yes,I sure it said 0X10,not 0X100.you can see the screenshot. – Blues Zhou Dec 21 '12 at 04:42
  • You're not the first. A handful of relevant threads, two from Cocoa-dev, one from MacRumors' programming forum: http://lists.apple.com/archives/Cocoa-dev/2007/Nov/msg02228.html http://lists.apple.com/archives/Cocoa-dev/2008/Jun/msg00482.html http://forums.macrumors.com/showthread.php?t=520053 – Peter Hosey Dec 23 '12 at 02:52

1 Answers1

21

NSUtilityWindowMask is a bit (0x10) in the styleMask property of a NSPanel which is not supported by NSWindow.

If you have created this in an xib, then you should be able to change the custom class to NSPanel, uncheck the utility mask checkbox and then change it back. If you did it in code, (or are changing the styleMask property in code) make sure that you are not setting bit 0x10 of styleMask.

lnafziger
  • 25,760
  • 8
  • 60
  • 101
  • 3
    Can't find the checkbox. I assume, as of Xcode 7 this is the "Style" drop down menu for NSPanel ("Regular Panel" / "Utility Panel" / "HUD Panel"). However, can not find a single window that is set to that in my whole project... – Nicolas Miari Feb 13 '16 at 05:40
  • 1
    The accepted answer is no longer valid. Any ideas what to do to fix this? – Houman Jul 03 '20 at 08:43