[Pythonmac-SIG] How to tell if a .app is clicked again?
Chris Barker
Chris.Barker at noaa.gov
Wed Aug 17 01:10:08 CEST 2005
Nicholas Riley wrote:
>>Which leads me to another idea: Can I tell OS-X that I DO want another
>>instance of the app launched rather than raising an existing one?
> You can do this (LaunchServices lets you multi-launch apps, or you can
> always execute the binary directly), but not from the Finder.
Darn.
> However, you could do something slightly different, and closer to your
> first idea: embed the actual app inside the launcher app's
> bundle. Then start your real app, with an icon or not, when the
> launcher app runs; the launcher app would then exit. If the launcher
> app notes that the real app is already running, then just open the
> page in the browser.
>
> The user would only see one app, and since the Finder in OS X no
> longer shows apps differently when they're open, they'd never know the
> difference.
I like this. Now I have to figure out how to put another app inside a
Py2app'd bundle. The "main" app and the one inside would both be python
apps.
It looks to me like a Py2app bundle has a little stub as the executable.
Could I build two py2app bundles, of two different scripts, then just
drag the executable from one into the other to get two in one, that
would share all the resources?
I guess I'll go try.
-Chris
--
Christopher Barker, Ph.D.
Oceanographer
NOAA/OR&R/HAZMAT (206) 526-6959 voice
7600 Sand Point Way NE (206) 526-6329 fax
Seattle, WA 98115 (206) 526-6317 main reception
Chris.Barker at noaa.gov
More information about the Pythonmac-SIG
mailing list