[wxPython-mac] Re: [Pythonmac-SIG] Re: [wxPython] Compiling wxPython on OS X 10.1

Kevin Ollivier kevino@tulane.edu
Fri, 9 Nov 2001 17:37:14 -0500


<<snip>>

> The conclusion of all this is that it seems unsafe to link anything that
could
> be run from the commandline against Carbon. If this appears to be the
problem
> with wxWindows too the solution is simple: use a .app. If you're hosting
this
> in Python already (I think you are, right?) then build the Python.app
> according to the instructions in Mac/OSX/README in the python
disitrbuiton.

Thanks for your detailed response!! It was very informative, and as you
already know, this was *exactly* the problem. Like Robin said, it is still
somewhat flaky but at least now we can see that it is flaky. =) And of
course, if we can actually see what the bugs are its easier to trace down
and fix the problem. =) One error I thought I'd throw out to you and the
groups. Messages like the ones below pop up from time to time in the console
when running wxPython apps:

--------------------------------------------------
Nov  9 10:25:54 localhost
/System/Library/CoreServices/Finder.app/Contents/MacOS/Finder:
kCGErrorFailure : _CGSLockAndUpdateWindow: cannot map visRegion shmem

Nov  9 10:25:54 localhost
/System/Library/CoreServices/Finder.app/Contents/MacOS/Finder:
kCGErrorFailure : _CGSLockAndUpdateWindow: cannot map shapeRegion shmem

Nov  9 10:25:54 localhost
/System/Library/CoreServices/Finder.app/Contents/MacOS/Finder:
kCGErrorFailure : _CGSLockAndUpdateWindow: cannot map shapeRegion shmem
----------------------------------------------------

I haven't yet figured out how to reproduce them (it seems to be behaving at
the moment), but my suspicion (since it's the finder throwing errors) is
that this has something to do with the top menubar and it being 'registered'
as an app. Python does not list its name in the top menubar, even when
running a wxPython script, and also the menubars for the wxPython app do not
appear. (Menubars do appear for compiled wxMac applications.) The error
messages (kCGErrorFailure) looked familiar to the ones that occurred with
command line Python, and I thought this may be related to Python.app itself
so I thought I would see if this meant anything to anyone. It also will only
run one copy of Python at a time - it "beeps" if you try to run another
Python script. Any thoughts? Is there a place where code specifying Python's
"behavior" as an app are specified, or are the limitations due to the fact
that it is a CLI app?

I don't yet know too much about building app bundles on OS X, but it looks
like it would be good to learn, so I'll probably do some more poking around
on the subject in the next week or so. Too bad I don't have a Mac at home,
although since I have school work that is probably a VERY bad idea. ^_^;
(One I will no doubt indulge myself in sometime soon though...!)

Thanks again to you, Robin and everyone else for all your help!! It feels
*really* good to get over this hurdle! =) Still more to get through, but
this is one big step closer to making wxPython on Mac a reality!

Kevin