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]

Reply via email to