I have a Cocoa document app targeting Snow Leopard. It is, in most respects, a standard document app except that, given an input file, it launches a long, multi-threaded computation. Consequently, it can handle only one input file at a time.
For the obvious reasons, I would very much like to disable the File/Open… command while the computation is proceeding. However, nothing I have been able to find seems to work with this command. For instance, the code below will disable the Open Recent command but the Open command seems immune. I have also tried to intercept the Open command in myDocController.m with a call to -(BOOL)validateMenuItem:(id)sender but that doesn't work either. I know that this must be an old problem, recognized and solved long ago. Could someone please point me to the solution. Sample code would be especially nice. Thank you very much. ________________________________ NSMenu *mFile = [[[NSApp mainMenu] itemWithTitle:@"File"] submenu]; [[mFile itemAtIndex:0] setEnabled:NO]; // Open… --> doesn't work!! [[mFile itemAtIndex:1] setEnabled:NO]; // Open Recent -- Mike McLaughlin _______________________________________________ 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