Register FAQ / Rules Forum Spy Search Today's Posts Mark Forums Read
Go Back   MacRumors Forums > Apple Systems and Services > Programming > Mac Programming

Reply
 
Thread Tools Search this Thread Display Modes
Old Jul 13, 2008, 08:04 PM   #1
Darkroom
Guest
 
Join Date: Dec 2006
Location: Montréal, Canada
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;
	}
any thoughts?
Darkroom is offline   0 Reply With Quote

Reply
MacRumors Forums > Apple Systems and Services > Programming > Mac Programming

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

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.

Mac Rumors | Mac | iPhone | iPhone Game Reviews | iPhone Apps

Mobile Version | Fixed | Fluid | Fluid HD
Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.

Privacy / DMCA contact / Affiliate and FTC Disclosure
Copyright 2002-2013, MacRumors.com, LLC