[Pythonmac-SIG] GUI apps appearing behind other apps on startup
Jack Jansen
Jack.Jansen@oratrix.com
Sun, 20 Apr 2003 23:30:17 +0200
On zondag, apr 20, 2003, at 20:39 Europe/Amsterdam, Kevin Altis wrote:
> 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?
Sorry, I missed this part. If you don't mind fixing the problem in your
script
there is a very easy way to do it:
import MacOS
if not MacOS.WMAvailable():
raise "Cannot reach the window manager"
WMAvailable() returns true if you can use the window manager, and as a
side
effect it raises the application to the foreground.
--
- Jack Jansen <Jack.Jansen@oratrix.com>
http://www.cwi.nl/~jack -
- If I can't dance I don't want to be part of your revolution -- Emma
Goldman -