Re: NSWindowController opens once
Re: NSWindowController opens once
- Subject: Re: NSWindowController opens once
- From: j o a r <email@hidden>
- Date: Sun, 16 Dec 2007 12:21:51 -0800
On Dec 16, 2007, at 12:02 PM, Aaron Vegh wrote:
-(id)init
{
self = [super initWithWindowNibName:@"preferences"];
theWindow = [self window];
[theWindow makeKeyAndOrderFront:self];
return self;
}
It seems that you have a "theWindow" instance variable in your window
controller subclass? That shouldn't be necessary, as
NSWindowController already has such an instance variable. Note that
you need to hook this outlet up in IB though!
I wouldn't call "-makeKeyAndOrderFront:" from the init method. Note
that you also already take care about that with your call to "-
showWindow:" in your "-showPreferencePanel:" method.
1. Preferences opens fine the first time. But when you try to open it
again, nothing happens. The menu item flashes when you hit Command-,,
but that's it.
Perhaps you've set the window to "release when closed" in the nib file?
j o a r
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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:
This email sent to email@hidden