• 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: opening the MainMenu nib window
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: opening the MainMenu nib window


  • Subject: Re: opening the MainMenu nib window
  • From: Fritz Anderson <email@hidden>
  • Date: Wed, 25 Jul 2007 12:31:38 -0500

On 25 Jul 2007, at 12:19 PM, Francis Derive wrote:

Anyway, when I check the "visible at launch time" attribute in IB - for the window object in the nib file, all is fine :

[NSApp mainMenu] returns a not null value.

When the same attribute is unchecked, the window is not visible ( normal ), but remains unvisible even after sending makeKeyAndOrderFront: ( I am not sure about the value of "sender" : nil, self - did read the doc, still looking for that somewhere ).

As I recall your example, you are sending makeKeyAndOrderFront: to the pointer returned by mainWindow.


If your application has no windows showing, then mainWindow returns nil. Sending makeKeyAndOrderFront: (or any other message) to nil will have no effect.

If you want access to a hidden window, make an IBOutlet for it in your controller class, and access it through that instance variable.

	— F

_______________________________________________

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: 
 >opening the MainMenu nib window (From: Francis Derive <email@hidden>)
 >Re: opening the MainMenu nib window (From: "I. Savant" <email@hidden>)
 >Re: opening the MainMenu nib window (From: Francis Derive <email@hidden>)

  • Prev by Date: Re: Custom NSViews and the view hiarchy
  • Next by Date: Re: opening the MainMenu nib window
  • Previous by thread: Re: opening the MainMenu nib window
  • Next by thread: Re: opening the MainMenu nib window
  • Index(es):
    • Date
    • Thread