• 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: weird sheet problem
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: weird sheet problem


  • Subject: Re: weird sheet problem
  • From: Dave Sopchak <email@hidden>
  • Date: Mon, 15 Jan 2007 14:03:24 -0800

Thanks for all the tips, folks!

I think I'll stick with Keary's suggestion,

	[[NSNotificationCenter defaultCenter] addObserver:self
				 selector:@selector(showNewSerialSheet)
				 name:@"NSWindowDidBecomeMainNotification" object:nil];


since I really want to wait until the main window is visible before doing the sheet. I had erroneously assumed that awakefromnib meant the windows would be visible.


Dave

On Jan 15, 2007, at 1:41 PM, PGM wrote:
Instead of a timer, it is handier to use [self performSelector:@selector(showNewSerialSheet) withObject:nil afterDelay:0.2];

I do not know whether a bug report is warranted, as I see some logic in it. For one thing, it makes sense (to me at least) that a sheet cannot and should not be attached to a window that is not visible. It also makes sense that the window is not yet on the screen when awakeFromNib is called, as that gives you the chance to set the correct states and values for all the items within the window. Combining these two, it follows that a sheet cannot be attached in awakeFromNib.

Patrick

_______________________________________________

Cocoa-dev mailing list (email@hidden)

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: 
 >Re: weird sheet problem (From: Keary Suska <email@hidden>)
 >Re: weird sheet problem (From: Dave Sopchak <email@hidden>)
 >Re: weird sheet problem (From: PGM <email@hidden>)

  • Prev by Date: align view in NSDrawer
  • Next by Date: RE: Weird Sheet Problem
  • Previous by thread: Re: weird sheet problem
  • Next by thread: RE: Weird Sheet Problem
  • Index(es):
    • Date
    • Thread