• 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: my preferences sheet appears under XCode not under the app ...
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


References: 
 >my preferences sheet appears under XCode not under the app ... (From: "Yvon Thoraval" <email@hidden>)

  • Prev by Date: Re: core data app questions - help!
  • Next by Date: Re: [ANN] RegexKit - An Objective-C Framework for Regular Expressions Using the PCRE Library
  • Previous by thread: Re: my preferences sheet appears under XCode not under the app ...
  • Next by thread: NSArrayController (or NSObjectController) in Entity Mode
  • Index(es):
    • Date
    • Thread