• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
NSWindowController confusion
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.
  • Prev by Date: Question regarding drawing NSImages
  • Next by Date: Re: Snapping Window Locations
  • Previous by thread: Re: Snapping Window Locations
  • Next by thread: Re: NSWindowController confusion
  • Index(es):
    • Date
    • Thread