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 to call it for, so I was wondering if anyone could give a quick example on how do I create an application? I found out that it's NSApplication and I need to setDelegate etc, but not sure what exactly is required. for example, to create a window, I would've needed this code:
NSWindow *window;
window = [[NSWindow alloc] initWithContentRect: NSMakeRect(10, 100, 150, 200)
styleMask:( NSResizableWindowMask | NSClosableWindowMask | NSTitledWindowMask)
backing: NSBackingStoreBuffered
defer: NO];
[window setTitle: @"Test window"];
So can anyone give me related code, but for NSApplication, I already have buttons and window?