• 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: Having trouble just displaying a window
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Having trouble just displaying a window


  • Subject: Re: Having trouble just displaying a window
  • From: Rick Mann <email@hidden>
  • Date: Thu, 15 Nov 2007 00:05:44 -0800


On Nov 14, 2007, at 11:11 PM, Hal Mueller wrote:

What class have you written -showOrHideWindow on? Is mChartInspectorController an instance of some subclass of NSWindowController? What is the value of window when - showOrHideWindow is called ( NSLog(@"window: %@", window); )?


Oh! the window is null:

2007-11-14 23:36:37.599 SatTrackX[14201:813] window: (null)


Sorry, I don't yet know enough about NSWindowController to know why it doesn't show. I have a .xib file named ChartInspector.xib, and the window inside that is named "ChartInspector". Nice of Cocoa to let me know why it's not loading...




showOrHideWindow is added to NSWindowController in the file before the inspector window's controller is allocated:


@interface NSWindowController(STXConvenience) - (BOOL) isWindowShown; - (void) showOrHideWindow; @end

@implementation NSWindowController(STXConvenience)

- (BOOL)
isWindowShown
{
	return [[self window] isVisible];
}

- (void)
showOrHideWindow
{
	if ([self isWindowShown])
	{
		[[self window] orderOut: self];				//	Hide the window
	}
	else
	{
		[self showWindow: self];					//	Show the window
	}
}

@end




_______________________________________________

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: Having trouble just displaying a window
      • From: Sherm Pendley <email@hidden>
References: 
 >Having trouble just displaying a window (From: Rick Mann <email@hidden>)

  • Prev by Date: Re: KVO problems popping up in Leopard
  • Next by Date: Re: Having trouble just displaying a window
  • Previous by thread: Having trouble just displaying a window
  • Next by thread: Re: Having trouble just displaying a window
  • Index(es):
    • Date
    • Thread