|
|
#1 |
|
Disable First Responder Menu Items?
when i switch from my Window Mode window to my Full Screen Mode window, i can disable "Minimize" and "Zoom"... but when i have a Sheet visible over the Window (in Window Mode) it doesn't allow me to disable "Minimize" and "Zoom" (they stay enabled)...
i don't understand why? i've set an outlet for the sheet in App Controller and connected it, so i'm thinking it's because these functions are first responder functions and that's why... do i have to set a delegate or something like that? (i still don't really understand what "Delegate" means )im my appController.m Code:
#pragma mark Disable Menu Items
// Tag #1: Window Mode
// Tag #2: Full Screen Mode
// Tag #4: Show/Hide Toolbar
// Tag #5: Minimize
// Tag #6: Zoom
- (BOOL)validateMenuItem:(NSMenuItem *)item
{
int itemTag = [item tag];
if (((itemTag == 1) && ([windowModeWindow isVisible])) || ((itemTag == 1) && ([sheet isVisible]))) //WORKS
return NO;
if (((itemTag == 2 || itemTag == 5 || itemTag == 6) && ([fullScreenModeWindow isVisible])) //WORKS
|| ((itemTag == 2 || itemTag == 5 || itemTag == 6) && ([sheet isVisible]))) //DOESN"T WORK
return NO;
if ((itemTag == 4) && ([registrationSheet isVisible])) //WORKS
return NO;
return YES;
}
|
|
|
|
0
|
![]() |
|
«
Previous Thread
|
Next Thread
»
| Thread Tools | Search this Thread |
| Display Modes | |
|
|
Similar Threads
|
||||
| thread | Thread Starter | Forum | Replies | Last Post |
| Why Xcode open project menu item is in disabled? | mikezang | iPhone/iPad Programming | 2 | Aug 14, 2011 09:11 AM |
| Display menu items out of the menu? | 124151155 | Mac Applications and Mac App Store | 0 | Oct 14, 2010 06:25 AM |
| Is it normal for the "Cut" menu item to not work in Finder? | jdavtz | Mac OS X | 15 | Aug 22, 2005 06:12 PM |
| iChat menu item hack? | ifjake | Mac Applications and Mac App Store | 2 | Jan 16, 2005 01:30 AM |
| software to manage menu items?? | barryishnikov | Mac Applications and Mac App Store | 0 | Sep 26, 2003 06:25 PM |
All times are GMT -5. The time now is 09:28 PM.




)

Linear Mode

