nsapplication
Get NSWindow from kCGWindowNumber
From kCGWindowNumber, how do I get NSWindow ref. I tried using: [NSApp windowWithWindowNumber:windowNumber][详细]
2023-04-09 06:37 分类:问答Why sendAction: doesn't work while performSelector: does?
I have a custom class that supports the target-action mechanism but oddly in this specific case, when I try to call the action by executing:[详细]
2023-04-06 17:10 分类:问答In Apple's Cocoa API, why is it important that NSApplicationMain be called from the main thread?
In the documentation for NSApplicationMain, it says: Creates the application, loads the main nib file from the application’s main bundle, and runs the application. You must call this functi开发者_J[详细]
2023-04-04 19:28 分类:问答How to connect a menu item to a custom action defined in the NSApplication delegate across nib files?
In my Cocoa app I have two NIB/XIB files that I need to connect: MainMenu.xib: contains a custom object for the NSApplication delegate object and connects it to the proper outlet in the NSApplicatio[详细]
2023-04-04 05:53 分类:问答How to know if a NSWindow is fullscreen in Mac OS X Lion?
I guess I should check if [NSApplication presentationOptions] contains NSFullScreenModeApplicationPresentationOptions, but how do I achieve that?[详细]
2023-03-23 05:13 分类:问答Cocoa: integrate NSApplication into an existing c++ mainloop
I know, that I am not the first one to try to use Cocoa on OSX together with an existing c/c++ main loop, but I am not really liking the solutions I came across so far so I came up with a different id[详细]
2023-03-21 14:57 分类:问答PYObjC NSWindow is NoneType?
window = NSApplication.sharedApplication().mainWindow() window.contentView().addSubview_(chart_view) The window was made in another section and appears fine but I get开发者_开发问答 this:[详细]
2023-03-14 12:05 分类:问答Creating NSApplication in cocoa?
I\'ve been searching for quite a while now but simply can\'t find anything, I already have window which I can create, but now when I tried to call makeKeyAndOrderFront for it, there was no application[详细]
2023-03-13 13:44 分类:问答Responding to "Hide Others" Mac OS X
I am looking for a notification or callback that is similar to NSWorkspaceDidHideApplicationNotification for when a user chooses \"Hide Others\" in any running application.I was wondering if anyone kn[详细]
2023-03-12 09:53 分类:问答Quit application after last window closes
I want to close my application when the last main window closes. I cannot use applicationShouldTerminateAfterLastWindowClosed: for the following reasons:[详细]
2023-03-08 16:31 分类:问答