That fixes it, but I thought the owner in this case was the owner of the NSWindowController, not the File's owner of the NIB.
NSWindowController has an "owner" property. But if you're saying the owner is the File's owner, which is the NSWindowController itself, then what is the owner property for? --- On Mon, 9/15/08, Graham Cox <[EMAIL PROTECTED]> wrote: > From: Graham Cox <[EMAIL PROTECTED]> > Subject: Re: NSWindowController > To: [EMAIL PROTECTED] > Cc: cocoa-dev@lists.apple.com > Date: Monday, September 15, 2008, 8:22 PM > On 16 Sep 2008, at 11:55 am, Chris Idou wrote: > > > - (IBAction)preferences:(id)sender { > > if (nil == preferencesController) { > > preferencesController = [[NSWindowController alloc] > > initWithWindowNibName:@"Preferences" > owner:self]; > > } > > [preferencesController showWindow:self]; > > } > > > > In the NIB, the file's owner is a > NSWindowController, and I have > > linked its window outlet to the Window. > > > I'm not sure if it's the cause of your problem, but > you're using > initWithWindowNibName:owner:, and passing 'self' as > the owner. Yet you > say that File's Owner is the Window Controller. > It's not clear what > 'self' is in this snippet, but it appears not to be > the window > controller but some higher-level object. > > You should probably just change that to > -initWithWindowNibName: so > that the controller itself is the owner. > > > hth, > > > Graham _______________________________________________ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please 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: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to [EMAIL PROTECTED]