Re: Bizarre [NSWindowController window] returning null
Re: Bizarre [NSWindowController window] returning null
- Subject: Re: Bizarre [NSWindowController window] returning null
- From: Roland King <email@hidden>
- Date: Sat, 04 Oct 2008 18:15:19 +0800
did you connect the window outlet of Files Owner in interface builder
to the window?
On Oct 4, 2008, at 6:08 PM, Ken Tozier wrote:
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
_______________________________________________
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