• 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
Bizarre [NSWindowController window] returning null
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Follow-Ups:
    • Re: Bizarre [NSWindowController window] returning null
      • From: Roland King <email@hidden>
  • Prev by Date: Re: Play Playlist in iTunes
  • Next by Date: Re: Bizarre [NSWindowController window] returning null
  • Previous by thread: Re: Accessing IB >Inspector > Identity > Interface Builder Identity > name programatically?
  • Next by thread: Re: Bizarre [NSWindowController window] returning null
  • Index(es):
    • Date
    • Thread