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 (Cocoa-dev@lists.apple.com)
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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com
This email sent to arch...@mail-archive.com