Month: May 2008

Creating a NSWindow programatically in Cocoa

Here is something that I haven’t found on the web: an example of how to create a NSWindow programatically from Cocoa. After a little bit of reading, and some head scratching, this is what I got: ?View Code OBJ-CNSRect windowRect = NSMakeRect(10.0f, 10.0f, 800.0f, 600.0f);   NSWindow *window = [[NSWindow alloc] initWithContentRect:windowRect styleMask:( NSResizableWindowMask | …

Creating a NSWindow programatically in CocoaRead More »