[menu addItemWithTitle:@"Exercise" action:@selector(editTable:)
keyEquivalent:@"1"];
[menu addItemWithTitle:@"Equipment" action:@selector(editTable:)
keyEquivalent:@"2"];
Etc.
In -editTable: I put a log message:
CPLog.debug( "Selected table '" + [sender title] + "'" );
But I always get "null". It seems that the sender is null, so I added:
if( sender == nil ) CPLog( @"Sender is null!" );
And the message "Sender is null!" appears every time. Is there
something wrong with menu item actions, or do I need to do something
different?
I also tried to create each menu item individually and set the target
manually (the above code is using the nil-targeted mechanism), but
that didn't work either.
TIA,
Keary Suska
Esoteritech, Inc.
"Demystifying technology for your home or business"