Re: Show a window from another nib
Re: Show a window from another nib
- Subject: Re: Show a window from another nib
- From: Scott Ribe <email@hidden>
- Date: Fri, 03 Nov 2006 10:08:50 -0700
- Thread-topic: Show a window from another nib
Roughly speaking (many variations possible, depending on how you organize
your project):
@interface MyWindowController : NSWindowController
{
}
+ ( MyWindowController *) createAndShowWindow;
@end
@implementation MyWindowController
+ ( MyWindowController *) createAndShowWindow
{
MyWindowController * wdw = [[ MyWindowController alloc] _init];
[[wdw window] makeKeyAndOrderFront: self];
return wdw;
}
- (id) _init
{
self = [super initWithWindowNibName: @"MyWindowNib" owner: self];
return self;
}
--
Scott Ribe
email@hidden
http://www.killerbytes.com/
(303) 722-0567 voice
_______________________________________________
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