• 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: enabling Edit menu items in a modal window?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: enabling Edit menu items in a modal window?


  • Subject: Re: enabling Edit menu items in a modal window?
  • From: Steve Christensen <email@hidden>
  • Date: Sat, 28 Feb 2009 16:12:08 -0800

On Feb 27, 2009, at 3:44 PM, Graham Cox wrote:

On 28/02/2009, at 4:26 AM, Steve Christensen wrote:

I'm working on a plugin that needs to do its configuration in a modal window. As soon as it calls [NSApp runModalForWindow:window], the items in the Edit menu are disabled. Is there some way to selectively enable some of the items? For instance, it'd be nice if I could do a Select All...

Well, does your modal window or its first responder or anything in- between implement selectAll:?


Commands in a menu will be enabled if anything in the responder chain can a) respond to them or b) explicitly enables them in a - validateMenuItem: call. When a modal window is displayed, the responder chain goes as far as the window and stops - it doesn't continue on up to the app as a modeless window's responder chain does.

As far as I know it should. My window is laid out in its nib like this:

- NSWindow
  - NSView (Content View)
    ...
    - NSScrollView
      - MyCustomTableView
        - NSTableColumn
        - NSTableColumn
    ...

At the time I check the Edit menu, the focus ring is around my custom table view and a row is selected. NSTableView says that it implements selectAll: and deselectAll:, and just to be extra sure, I created my own that just call super, but that doesn't change any behavior.
_______________________________________________


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: 
 >enabling Edit menu items in a modal window? (From: Steve Christensen <email@hidden>)
 >Re: enabling Edit menu items in a modal window? (From: Graham Cox <email@hidden>)

  • Prev by Date: Re: Name to PSN
  • Next by Date: Re: Core Data: Delete stops at first object in Cascade
  • Previous by thread: Re: enabling Edit menu items in a modal window?
  • Next by thread: NSPrefrencePane with Garbage Collection won't work in System Preferences?
  • Index(es):
    • Date
    • Thread