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

Re: Bizarre [NSWindowController window] returning null


  • Subject: Re: Bizarre [NSWindowController window] returning null
  • From: Ken Tozier <email@hidden>
  • Date: Sat, 4 Oct 2008 06:23:51 -0400

Bingo! Thanks Roland.

On Oct 4, 2008, at 6:15 AM, Roland King wrote:

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


References: 
 >Bizarre [NSWindowController window] returning null (From: Ken Tozier <email@hidden>)
 >Re: Bizarre [NSWindowController window] returning null (From: Roland King <email@hidden>)

  • Prev by Date: Re: Bizarre [NSWindowController window] returning null
  • Next by Date: Re: Accessing IB >Inspector > Identity > Interface Builder Identity > name programatically?
  • Previous by thread: Re: Bizarre [NSWindowController window] returning null
  • Next by thread: Re: NSTreeController rearrangeObjects doesn't always trigger sorting
  • Index(es):
    • Date
    • Thread