I created the following NSWindowController subclass which loads and
displays a window without problem, but am finding that whenever I try
to actually access the window with [NSWindowController window] it
always returns null.
- (id) init
{
NSBundle *bundle = [NSBundle bundleForClass: [self class]];
NSString *nibPath = [bundle pathForResource: @"PMScriptPalette"
ofType: @"nib"];
self = [super initWithWindowNibPath: nibPath owner: self];
if (self)
{
NSLog(@"[self window]: %@", [self window]);
NSLog(@"[[self window] contentView]: %@", [[self window]
contentView]);
}
return self;
}
I added another test in a "show" method but still get null
- (void) show
{
NSLog(@"show: [self window]: %@", [self window]);
[[self window] orderFront: self];
}
Anyone know why this might be happening?
Thanks in advance
_______________________________________________
Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com
This email sent to [EMAIL PROTECTED]