• 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: Menu items disabled - Loading a ui framework from cocoa app
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Menu items disabled - Loading a ui framework from cocoa app


  • Subject: Re: Menu items disabled - Loading a ui framework from cocoa app
  • From: Joshua Scott Emmons <email@hidden>
  • Date: Mon, 30 Jan 2006 13:09:15 -0600

To start, the priority of the message you sent to the list was "urgent". That's annoying. Please don't do that.

In a C function i am loading this nib by passing a window controller object as a Files Owner.
I am calling this function from my Cocoa application. The window is shown and all events works fine except the main menu bar items. Menu items like Quit & About are disabled.

Menu items are disabled when they are either not connected to an action, or that action isn't handled by anything in the current responder chain. By default (that is, if you create a Cocoa Application with XCode's New Project Assistant), About Application and Quit Application are wired to the -orderFrontStandardAboutPanel: and -terminate: methods of the File's Owner. You say you are passing your window controller in as the file's owner. Does your window controller handle these methods? Until it does, those menu items will remain inactive.


By default these menu items are handled by NSApplication, so you could always just call NSApp's implementations of the above methods from your window controller. Though a better solution would be to keep NSApplication as the File's Owner, just like it is by default. I don't understand what it is your program is doing, but in general it is a good idea to stay as close to the default project as is possible. XCode's pretty smart about setting that stuff up.


Cheers, -Joshua Emmons _______________________________________________ Do not post admin requests to the list. They will be ignored. Cocoa-dev mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden
References: 
 >Menu items disabled - Loading a ui framework from cocoa app (From: "Ayyapu Reddy Pallam" <email@hidden>)

  • Prev by Date: Minimize terminates application
  • Next by Date: Re: Fake NSMenu-like view
  • Previous by thread: Menu items disabled - Loading a ui framework from cocoa app
  • Next by thread: To thread or not to thread?
  • Index(es):
    • Date
    • Thread