[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: [pygame] Menu items in OS X?



Ugh, how horrible.

Quoting Bob Ippolito <bob@xxxxxxxxxx>:

> The only relevant API is the NSMenu and NSMenuItem APIs in Cocoa,
> which can be used from PyObjC. Quartz is just drawing, and that
> particular wrapper is proprietary and is only available with the
> Python 2.3 that Apple shipped with Mac OS X.
> 
> -bob
> 
> On 2/11/07, JoN <jon@xxxxxxxxxxxxxxxxxx> wrote:
> >
> > Hey Nathan!
> >
> > Check this out:
> > http://developer.apple.com/graphicsimaging/pythonandquartz.html
> >
> > (I just did a google then on: python "os x").
> >
> >
> > Jon
> >
> >
> > Quoting Nathan <nathan.stocks@xxxxxxxxx>:
> >
> > > On 2/11/07, JoN <jon@xxxxxxxxxxxxxxxxxx> wrote:
> > > > You know I could _swear_ I'd seen a python API for talking to Aqua's
> menu
> > > > systems.   Take a look on the Apple site forums, or even the Darwin
> lists
> > > maybe?
> > > > Apple forums are notoriously unhelpful, but you may well find some
> > > developers
> > > > who will talk about this, and a lot of apple devel's are pythonauts
> too.
> > >
> > > I've had first-hand experience with the unhelpfulness of Apple site
> > > forums, but I guess it's worth a try.  (sigh) I was hoping there would
> > > be standard menu-option stuff in PyGame itself.
> > >
> > > I looked around the PyObjc site, and I'm pretty sure I could add menu
> > > items through it, since it seems to be a bridge to Cocoa stuff -- but
> > > that's completely uncharted territory for me.
> > >
> > > Selecting the "Quit" item under my app's menu causes my checkers
> > > program to spit the following error out to my terminal:
> > >
> > > 2007-02-10 11:20:10.197 python[9898] could not find associated NSMenu
> > > for -20213 (item:9)
> > >
> > > So it would seem that PyObjc is already being used in some way since
> > > the menu command reached python, and I never did anything to add the
> > > menu item myself.
> > >
> > > ~ Nathan
> > >
> >
> >
> >
> >
> > --------------------------------------------------------------------
> > Come and visit Web Prophets Website at http://www.webprophets.net.au
> >
> >
> 




--------------------------------------------------------------------
Come and visit Web Prophets Website at http://www.webprophets.net.au