Just so everyone knows, I am novice programmer, so please let me know if I have not provided enough info.
I have a document based Cocoa Java app. In my .java class that extends NSDocument I have the following code:
public boolean validateMenuItem(_NSObsoleteMenuItemProtocol menuItem) {
boolean enable = false;
String sel = menuItem.action().name();
if (sel.equals("saveDocumentAs:")) {
return enable;
} else {
enable=true;
return enable;
}
}
________
Now it seems that this code should disable the save as... menu item, but when I run it in the debugger, this code isn't even getting called. Interestingly, at one point, it was getting called and everything worked, now, I don't know what I did, but it doesn't work. Any suggestions?