Re: my preferences sheet appears under XCode not under the app ...
Re: my preferences sheet appears under XCode not under the app ...
- Subject: Re: my preferences sheet appears under XCode not under the app ...
- From: PGM <email@hidden>
- Date: Sun, 2 Sep 2007 17:50:07 -0400
On 2-Sep-07, at 11:51 AM, Yvon Thoraval wrote:
when it is the first run of my app, i force the app to open the
preferences
sheet like that :
def awakeFromNib()
puts "@isFirstRun = #{@isFirstRun}"
if @isFirstRun
@prefs = Preferences.new
showPreferences( @mainWindow )
@prefs.save
end
[...]
The trick about awakeFromNib is that it is called just before the
window is shown. This is very useful as it allows you to change
aspects of the window's content before it is shown. However it means
that you can't attach a sheet to the window, as you can't attach a
sheet to a window that is not visible.
On a side note, I don't think that a preferences window should never
be displayed as a sheet as there usually is no reason why it should
block the user from using the main window.
Cheers, Patrick
_______________________________________________
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