[Pythonmac-SIG] Re: [wxPython-mac] Menus for wxPythonMac

Robin Dunn robin@alldunn.com
Sun, 6 Jan 2002 16:43:05 -0800


> Sorry for the cross-posting, but I thought I'd cover all my bases! =)
>
> I'll briefly explain where I'm at. I'm using the Carbon version of Python
> 2.2, along with wxWindows and wxPython on OS X 10.1.2. I've pulled all the
> sources from CVS. Everything compiles, and so far I've been able to run
> wxPython scripts with a limited degree of success. However, the major
> problem is that I'm still having troubles with the menus. When I load a
> wxPython script in Python, Python's menubars stay active and the menus
> created by the script are nowhere to be found. Has anyone else experienced
> this?

Yes.  I've been experimenting with Python built as a Framework and have the
similar problem of there being no menus at all.

>
> Also, when I run the script it does not open as a separate application in
OS
> X. All windows are listed as child windows of the Python application. I'm
> wondering if these two issues are related. wxPython may not be able to
> modify Python's menus, and since it does not have its own application, it
> has no way of showing its own menus. Does this make sense? I admit I'm
> pretty new to Mac programming, and as such I'm a bit stuck as to what can
be
> done about this problem. Any help would be appreciated!

An approach that I've been thinking of trying is to build a wxMac C++
application that embeds Python, rather than a standard Python extension
module.  This app can then do the housework necessary to be a well behaved
Mac app, and then hand off to the embedded Python to run the main wxPython
script.  I havn't had much time lately to do more than think about this,
perhaps if you've got the time you could try it?  Any more knowledgable
people have comments about this approach?

--
Robin Dunn
Software Craftsman
robin@AllDunn.com       Java give you jitters?
http://wxPython.org      Relax with wxPython!