Open a window created in another nib
Open a window created in another nib
- Subject: Open a window created in another nib
- From: Andrea Salomoni <email@hidden>
- Date: Wed, 28 Dec 2005 10:13:05 +0100
Hi to all,
I created a secondary nib file that contains a NSWindow.
I created the nib using IB and choosing new application.
After it I made a new class and instatiated it in IB, connected an
outlet to the window.
I have another nib file (the main) with a button connected, I would
like to open the secondary nib file window clicking on it.
I added in the controller.h this:
MYWindowController * theSecondWin;
in the .m file:
-(id)init
....
theSecondWin = [[MYWindowController]alloc]init];
....
}
and an action
-(IBAction)openWin:(id)sender
{
[theSecondWind openW];
}
In the MYWindowController.m the method:
-(void)openWin
{
[theWindow makeKeyAndOrderFront:self];
}
But the window still close....
Where am I wrong?
Thank you all
Andrea
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden