views:

15

answers:

1

Hey guys, I have some questions about NSWindowController. I have a subclass of NSWindowController that has its own nib. I have another class that has an event that shows the window and loads it like so.

if (!propertiesController){
    propertiesController = [[WorldPropertiesController alloc] init];
}
[propertiesController showWindow:self];

It works great the first time but after I close the window and call this event again it does not show it. I am pretty sure it is not getting released because the pointer is still fine. Do I possibly have to override showWindow to order the window to the front? Or do I have to specify what window the controller uses in the nib?

A: 

have you tried

[propertiesController.window makeKeyAndOrderFront:self];

?

G3z
Ok I think thats on the right lines. Do I have to specify the window for the properties controller in the nib it loads?
Justin Meiners
Ok yeah it was just an IBOutlet thanks for the help
Justin Meiners
Wow I didnt even need that. I was just being dumb. Thanks for the help though.
Justin Meiners