[Pythonmac-SIG] GUI apps appearing behind other apps on startup

Kevin Altis altis@semi-retired.com
Sun, 20 Apr 2003 11:39:33 -0700


I've brought this up before, but I don't remember if there was a solution. I
seem to remember Just saying that making a bundle solved the problem, but I
can't even find that email. Besides that is only a partial solution since I
don't want to have to build bundles while developing/testing an app.

Anyway, using the 2.3a2 binary the Robin built and wxPython 2.4.0.7,
double-clicking a GUI script (uses PythonLauncher) or starting it with
pythonw in the Terminal causes the app to appear behind other windows on the
desktop.

The more I use Python to create apps on Mac OS X, the more it bothers me.
Since I think I finally have control dragging working correctly in the
resourceEditor across Mac OS X, Linux, and Windows this is going to become a
big deal for anyone making use of PythonCard on Mac OS X.

Note that trying a trick in wxPython like calling

  wx.wxCallAfter(self.frame.Raise)

as part of the application initialization doesn't solve the problem. So,
would it be possible for the PythonLauncher and/or pythonw to raise the app
via a Mac OS X system call? Other ideas?

On a related note, I haven't had good luck creating bundles of wxPython
scripts and in particular PythonCard scripts, but that is a separate issue
that I need some help on so I can get a sample of doing it into the
PythonCard distribution.

ka
---
Kevin Altis
altis@semi-retired.com
http://altis.pycs.net/
http://www.pythoncard.org/