• 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: Cocoa beginner question
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Cocoa beginner question


  • Subject: Re: Cocoa beginner question
  • From: email@hidden
  • Date: Sat, 1 Dec 2001 03:58:11 -0500

On Wednesday, November 28, 2001, at 06:44 , Hussein Yahia wrote:

I create a simple cocoa app with PB. Using IB, I connect the "open"
menu to the action in FirstResponder : "openDocument". When I test it
under IB, if I choose "Open" in the menu, everything goes as expected :
it display s a window for opening a file. But if I compile the app in
PB, the "open" menu remains dimmed.

How to solve that ?

You need to implement openDocument: somewhere in your responder chain, or create a document-based project and NSDocument implements it for you. It worked in Interface Builder because IB implements openDocument:, so the connection was valid. A menu item automatically dims when no object in the responder chain implements its action.

Hope that helps,
Itrat.

..................................................................
Itrat Khan
Modeless Software, Inc.
http://www.modeless-software.com


  • Prev by Date: Re: NSDrawer Constants documented incorrectly
  • Next by Date: Re: NSDrawer Constants documented incorrectly
  • Previous by thread: Re: NSDrawer Constants documented incorrectly
  • Next by thread: Re: open Drawer on startup
  • Index(es):
    • Date
    • Thread