Code review time

Right now, I’m reviewing code I copied into my own code branch (p4) and I’m finding that I’m doing something I thought I’d never do. I’m actually lining up functions and parameters into columns. I have to admit, it’s much easier to read code this way then when code is all smushed together. Now, I … Read more

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: NSRect windowRect = NSMakeRect(10.0f, 10.0f, 800.0f, 600.0f); NSWindow *window = [[NSWindow alloc] initWithContentRect:windowRect styleMask:( NSResizableWindowMask | NSClosableWindowMask | NSTitledWindowMask) … Read more