Re: NSMenu setMenuBarVisible
Re: NSMenu setMenuBarVisible
On Tue, Oct 22, 2002 at 03:57:27PM -0500, Howard Dittmer wrote:
>
I am trying to create an application for use in a public place with a
>
touch screen and no Menu Bar. I find that there is a method
>
setMenuBarVisible that is part of NSMenu. However I am having
>
difficulty finding a way to get ahold of an object that I can apply
>
this to. Suggestions?
#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_2
+ (void)setMenuBarVisible:(BOOL)visible;
+ (BOOL)menuBarVisible;
#endif
The "+" at the beginning of this line indicates that setMenuBarVisible
is a class method - you invoke it on NSMenu itself, as [NSMenu
setMenuBarVisible: NO];. Assuming you didn't know that, please read
some basic Objective-C documentation, such as is available on Apple's
site.
Incidentally, if you want to access the menus of an application, use
[NSApp mainMenu].
--
=Nicholas Riley <email@hidden> | <
http://www.uiuc.edu/ph/www/njriley>
Pablo Research Group, Department of Computer Science and
Medical Scholars Program, University of Illinois at Urbana-Champaign
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.