NSWindowController confusion
NSWindowController confusion
- Subject: NSWindowController confusion
- From: Philippe Hausler <email@hidden>
- Date: Mon, 17 Jun 2002 20:10:31 -0500
I want to load nibs that are externally located in reference to the
application and generate windows accordingly.
all of the nibs are the same, they have a file's owner as a
NSWindowController
@implementation MyObject
- (id)init
{
wControllers = [NSMutableArray arrayWithObjects:
[[NSWindowController alloc] initWithWindowNibPath:
@"/Users/philippe/Desktop/1.nib" owner:self], [[NSWindowController
alloc] initWithWindowNibPath: @"/Users/philippe/Desktop/2.nib"
owner:self], [[NSWindowController alloc] initWithWindowNibPath:
@"/Users/philippe/Desktop/3.nib" owner:self], nil];
[wControllers retain];
return self;
}
- (void)dealloc
{
[wControllers release];
[super dealloc];
}
- (IBAction)showWindows:(id)sender
{
[[wControllers objectAtIndex: 0] showWindow: self];
[[wControllers objectAtIndex: 1] showWindow: self];
[[wControllers objectAtIndex: 2] showWindow: self];
}
@end
this does not display the windows
is there a way to achieve loading a subclass of an NSWindow with a
particular nib and connecting all the actions that the window would send
to one function? if so, a small snippit might be helpful
Thanx,
Philippe
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.