Bizarre [NSWindowController window] returning null
Bizarre [NSWindowController window] returning null
- Subject: Bizarre [NSWindowController window] returning null
- From: Ken Tozier <email@hidden>
- Date: Sat, 4 Oct 2008 06:08:52 -0400
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 (email@hidden)
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:
This email sent to email@hidden