Another dumb question about NSWindowController(s)

2014-06-07 Thread William Squires
Okay, if I create a new NSWindowController subclass (and tell Xcode to generate the .xib as well), it gives me simple (too simple, I think) template code, whose init... method takes an NSWindow reference. Where does this come from (the reference)? • Is the code instantiating the custom

Re: Another dumb question about NSWindowController(s)

2014-06-07 Thread Lee Ann Rucker
Delete that init method. Xcode has a standard template and doesn't change it when you tick the make a xib file checkbox. Replace it with - (id)init { return [self initWithWindowNibName:@myGeneratedNibFileName]; } There are plenty of sample apps you can download from Apple that use windows

Re: Another dumb question about NSWindowController(s)

2014-06-07 Thread Seth Willits
initWithWindow: is the designated initializer which is why the template has it vs one other of the init methods, but it doesn't mean you have to use it. It's not there to tell you that you need to call it, it's there so you can add initialization-time code as needed. The easiest thing to do