Re: weird sheet problem
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