Re: How to show a sheet right when the app starts?
Re: How to show a sheet right when the app starts?
- Subject: Re: How to show a sheet right when the app starts?
- From: Joar Wingfors <email@hidden>
- Date: Thu, 4 Feb 2010 20:49:58 -0800
On 4 feb 2010, at 20.41, Nick Zitzmann wrote:
>> I would basically
>> like to display a sheet right after the main window is shown. I tried
>> setting the main window delegate as the app controller, but I'm not exactly
>> sure in what method call I should show the sheet. I tried to show the sheet
>> in awakeFromNib, but that did nothing. :(
>>
>> Any hints?
>
> -windowDidBecomeKey: in the delegate?
That would trigger *every* time the window is made key though.
Doing it in awakeFromNib should work fine, at least provided that the window is on screen at that time. You might want to invoke "-orderFront:" on the source window before trying to add the sheet. You should probably also verify that the source window is non-nil (in other words, that the connection from your controller class to the window is properly hooked up in IB).
j o a r
_______________________________________________
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