Is there a way to get AppKit to include my subclass of NSWindow with no fields in the Window menu?

I have a subclass of the NSWindow class without borders, which I use as part of a document-based application. I could not find a way to enable it in the Window menu. Calling setExcludedFromWindowsMenu: does not affect window creation. Any ideas?

+4
source share
1 answer

Use -[NSApplication addWindowsItem:title:filename:] and manually add the window to the Window menu. For instance:

 YourBorderlessWindow *window = …; [NSApp addWindowsItem:window title:[window title] filename:NO]; 
+5
source

All Articles