On Mar 1, 2009, at 11:38 PM, Paul Sanders wrote:

I added a text field to my modal window, and when it is the first
responder the cut, copy, paste and select all menu items are enabled.
Just for grins I added a second NSTableView to the window and
rebuilt. When that table has focus, the edit menu items are all
disabled, just like for the original table.

I admit the possibility that I'm doing something weird, but it must
be a NSTableView-only kind of weird...

You could write a little class that derives from NSTableView and override validateMenuItem. Putting a debugger breakpoint on that might tell you
more.  The ins-and-outs of it are covered here:

http://developer.apple.com/DOCUMENTATION/Cocoa/Reference/ ApplicationKit/Protocols/NSMenuValidation_Protocol/Reference/ Reference.html

I tried doing that, both in my NSTableView subclass and, just to see if it would make a difference, in my window controller. No difference. This continues to be strange since NSTextFields work just great in that regard.

I also tried another test case and created a new Cocoa app project with a table in a window. When I ran it as-is, Select All was disabled. When I subclassed the table and added validateMenuItem:, Select All was enabled. So at this point I'm stuck because nobody even calls validateMenuItem: for my modal window...

steve

_______________________________________________

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

Reply via email to