NSWindowController opens once
NSWindowController opens once
- Subject: NSWindowController opens once
- From: "Aaron Vegh" <email@hidden>
- Date: Sun, 16 Dec 2007 15:02:49 -0500
Hi there,
I'm getting a little flummoxed by the mysterious behaviour of some of
my project's window controllers! I have my main appcontroller with a
function for opening my Preferences window:
-(IBAction)showPreferencePanel:(id)sender
{
if(!preferenceController) {
preferenceController = [[PreferenceController alloc] init];
}
[preferenceController showWindow:self];
}
All cool, and in my PreferenceController, the following code to
initialize the window:
-(id)init
{
self = [super initWithWindowNibName:@"preferences"];
theWindow = [self window];
[theWindow makeKeyAndOrderFront:self];
return self;
}
All right, so I have two problems:
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.
2. Despite sending a makeKeyAndOrderFront: method call, the window
comes up inactive.
What am I missing here?
Thanks!
Aaron.
--
Aaron Vegh, Principal
Innoveghtive Inc.
P: (647) 477-2690
C: (905) 924-1220
www.innoveghtive.com
www.website-in-a-day.com
_______________________________________________
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