Thread: [Pyobjc-dev] Double clicking app build with py2app in Finder not working
Brought to you by:
ronaldoussoren
From: Kunal P. <kun...@gm...> - 2012-11-16 09:48:26
|
I've been having this problem where an app built with py2app does not run correctly when I double click it from Finder. It works if I run the executable directly (.app/Contents/MacOS/app) from Finder or via terminal. I tried troubleshooting but only got so far as to know that applicationDidFinishLaunch: is not getting called on my app delegate. I dont know why though. I found a couple other threads talking about the same problem - http://stackoverflow.com/questions/11663545/launching-application-made-with-py2app https://groups.google.com/forum/#!topic/pygame-mirror-on-google-groups/eBEW8m0jtl0 I'm using py2app v0.7.1, pyobjc-core v2.4 on OS X 10.8.2. Hope someone here can help! Thanks, Kunal |
From: Ronald O. <ron...@ma...> - 2012-11-16 10:30:29
|
On 16 Nov, 2012, at 10:48, Kunal Parmar <kun...@gm...> wrote: > I've been having this problem where an app built with py2app does not run correctly when I double click it from Finder. It works if I run the executable directly (.app/Contents/MacOS/app) from Finder or via terminal. > > I tried troubleshooting but only got so far as to know that applicationDidFinishLaunch: is not getting called on my app delegate. I dont know why though. You migth depend on details of the shell environment. What do you mean by "does not run correctly"? Does the application launch but with limited functionality, or do you get an error when launching? Do the basic examples that are included with pyobjc work? Ronald > > I found a couple other threads talking about the same problem - > http://stackoverflow.com/questions/11663545/launching-application-made-with-py2app > https://groups.google.com/forum/#!topic/pygame-mirror-on-google-groups/eBEW8m0jtl0 > > I'm using py2app v0.7.1, pyobjc-core v2.4 on OS X 10.8.2. > > Hope someone here can help! > > Thanks, > Kunal > ------------------------------------------------------------------------------ > Monitor your physical, virtual and cloud infrastructure from a single > web console. Get in-depth insight into apps, servers, databases, vmware, > SAP, cloud infrastructure, etc. Download 30-day Free Trial. > Pricing starts from $795 for 25 servers or applications! > http://p.sf.net/sfu/zoho_dev2dev_nov_______________________________________________ > Pyobjc-dev mailing list > Pyo...@li... > https://lists.sourceforge.net/lists/listinfo/pyobjc-dev |
From: Kunal P. <kun...@gm...> - 2012-11-17 01:42:03
|
The problem was argv_emulation. I had argv_emulation set to True. When I double click the app in Finder, my app shows up in the Dock and the Status Bar. But neither the window nor the alert shows up. When I click on the Dock icon, then both of them show up. Here's a link to the entire project and a build that does not work: https://cloud.box.com/s/tuzakq025ab7t49geoh9 Thanks to Ronald, I looked through an example and found that argv_emulation was not set at all. I set it to False and my app behaved as expected. Is this a known issue? |
From: Ronald O. <ron...@ma...> - 2012-11-19 09:32:34
|
On 17 Nov, 2012, at 2:41, Kunal Parmar <kun...@gm...> wrote: > The problem was argv_emulation. > > I had argv_emulation set to True. When I double click the app in Finder, my app shows up in the Dock and the Status Bar. But neither the window nor the alert shows up. When I click on the Dock icon, then both of them show up. Here's a link to the entire project and a build that does not work: https://cloud.box.com/s/tuzakq025ab7t49geoh9 That links requires a password. > > Thanks to Ronald, I looked through an example and found that argv_emulation was not set at all. I set it to False and my app behaved as expected. > > Is this a known issue? No, argv_emulation should work fine. However: it is also not very useful for applications that use PyObjC. Argv_emulation is a hack for using cross-platform scripts: it starts a temporary eventloop to intercept file-open events, adds those files to sys.argv and finally starts the actual script. With PyObjC you can use the regular Cocoa mechanism for this (such as the application:openFiles: selector on the application delegate). Ronald > ------------------------------------------------------------------------------ > Monitor your physical, virtual and cloud infrastructure from a single > web console. Get in-depth insight into apps, servers, databases, vmware, > SAP, cloud infrastructure, etc. Download 30-day Free Trial. > Pricing starts from $795 for 25 servers or applications! > http://p.sf.net/sfu/zoho_dev2dev_nov_______________________________________________ > Pyobjc-dev mailing list > Pyo...@li... > https://lists.sourceforge.net/lists/listinfo/pyobjc-dev |
From: Kunal P. <kun...@gm...> - 2012-11-19 09:37:05
|
> That links requires a password. > I forgot to open access to all. Try again. |
From: Ronald O. <ron...@ma...> - 2012-11-19 10:00:31
|
On 19 Nov, 2012, at 10:36, Kunal Parmar <kun...@gm...> wrote: > > That links requires a password. > > I forgot to open access to all. Try again. I can now download the archive. Thanks, Ronald > ------------------------------------------------------------------------------ > Monitor your physical, virtual and cloud infrastructure from a single > web console. Get in-depth insight into apps, servers, databases, vmware, > SAP, cloud infrastructure, etc. Download 30-day Free Trial. > Pricing starts from $795 for 25 servers or applications! > http://p.sf.net/sfu/zoho_dev2dev_nov_______________________________________________ > Pyobjc-dev mailing list > Pyo...@li... > https://lists.sourceforge.net/lists/listinfo/pyobjc-dev |