• 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: NSWindowController confusion redux
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSWindowController confusion redux


  • Subject: Re: NSWindowController confusion redux
  • From: Ken Tozier <email@hidden>
  • Date: Tue, 23 May 2006 00:11:05 -0400


On May 22, 2006, at 4:14 AM, mmalcolm crawford wrote:


On May 22, 2006, at 1:02 AM, Ken Tozier wrote:

mainPaletteController = [[NSWindowController alloc] initWithWindowNibName: @"MainPalette" owner: self];

mainPaletteController = [[NSWindowController alloc] initWithWindowNibName: @"MainPalette"];

Thanks mmalc, but alas, no. Still getting a null window.

Running this:
mainPaletteController = [[NSWindowController alloc] initWithWindowNibName: @"MainPalette"];
[mainPaletteController showWindow: self];
NSLog(@"window = %@", [mainPaletteController window]);


(No window appears on screen)

NSLog output:
2006-05-22 23:49:35.932 QuarkXPress[23268] -[NSWindowController loadWindow]: failed to load window nib file 'MainPalette'.
2006-05-22 23:49:35.933 QuarkXPress[23268] window = (null)



Running this:
mainPaletteController = [[NSWindowController alloc] initWithWindowNibName: @"MainPalette" owner: self];
[mainPaletteController showWindow: self];
NSLog(@"window = %@", [mainPaletteController window]);


(Window appears on screen)

NSLog output:
2006-05-22 23:55:18.749 QuarkXPress[23302] window = (null)

So it looks like the "owner" field is mandatory, at least in my case.

I guess I don't understand how a window can exist on screen and behave normally at least as far as layer switching/moving around the screen goes if nothing owns or has access to it. What could possibly be the owner if not the window controller? Who's retaining it? I'm not doing anything especially tricky here. Just open the window and I want to hide it or show it in response to a menu command. Those three lines are it as far as creation/initialization goes.

Ken




_______________________________________________ Do not post admin requests to the list. They will be ignored. Cocoa-dev mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden
  • Follow-Ups:
    • Re: NSWindowController confusion redux
      • From: Sherm Pendley <email@hidden>
    • Re: NSWindowController confusion redux
      • From: Mike Abdullah <email@hidden>
References: 
 >NSWindowController confusion (From: Ken Tozier <email@hidden>)
 >Re: NSWindowController confusion (From: Sherm Pendley <email@hidden>)
 >Re: NSWindowController confusion (From: Ken Tozier <email@hidden>)
 >Re: NSWindowController confusion redux (From: Ken Tozier <email@hidden>)
 >Re: NSWindowController confusion redux (From: mmalcolm crawford <email@hidden>)

  • Prev by Date: Re: NSTableView with different color in row
  • Next by Date: Re: KVO question
  • Previous by thread: Re: NSWindowController confusion redux
  • Next by thread: Re: NSWindowController confusion redux
  • Index(es):
    • Date
    • Thread