[Pythonmac-SIG] turning off "toolbar" without going fullscreen?

Bob Ippolito bob at redivi.com
Mon Aug 11 14:40:37 EDT 2003


On Monday, Aug 11, 2003, at 13:26 America/New_York, Andrew Straw wrote:

>> Actually, I was hoping a Mac guru would just say, "oh, yeah -- turn 
>> of the toolbar with NSTurnToolbarOff()". :)
>
> I figured it out:
>
> When using a recent pygame with Bob's latest macosx module, do this 
> after importing (and probably initing) pygame:
>
>
> import pygame.macosx
> pygame.macosx.app.mainMenu().setMenuBarVisible_(False)
>
>
> This leads to another question from a total PyObjC (and ObjC) newbie:
>
> Is there anyway to grab the instance of NSApplication in use without 
> knowing the innards of some (possibly) PyObjC module that started it?

Wow, cool, I'm glad you got it working :)

NSApplication is a singleton..

NSApplication.sharedApplication() will always return the same thing for 
a particular process, you don't need to dig at the pygame one.

-bob




More information about the Pythonmac-SIG mailing list