Re: NSWindowController subclass initialization
Re: NSWindowController subclass initialization
- Subject: Re: NSWindowController subclass initialization
- From: Jerry Krinock <email@hidden>
- Date: Sun, 03 Dec 2006 06:34:20 -0800
- Thread-topic: NSWindowController subclass initialization
on 06/12/03 5:21, Jonathon Mah at email@hidden wrote:
> Hi Jeff,
>
> On 2006-12-03, at 09:33, Jeff Hellman wrote:
>
>> In HandoutsReportController.m I have the following method:
>>
>> -(id) init {
>
> I don't think this is the problem here, but subclasses should
> generally override the designated initializer (which, for
> NSWindowController, is -initWithWindow:).
I never noticed that, but you're correct. But I've never used
initWithWindow:, always initWithWindowNibName:. Furthermore, I generally do
it the way Jeff does, so I can keep the nib name in the window controller's
implementation. I always thought it was kind of silly to say "Initialize
Window Controller 'Jack' using 'Jack's nib'". Jack should know his own nib.
>> Notice that the init method in HandoutsReportController is never
>> called. If I change my Active Build from Release to Debug, this works
>> perfectly:
>
> Trash the build folder?
Oh, that's a good idea! As a matter of practice, I always run a Shell
Script Build Phase to rebuild my entire product package from scratch with
each build, instead of using Xcode's built-in "smarts". It only takes a
second, and I always know what I got in there!
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden