Re: Double clicking app build with py2app in Finder not working
Ronald Oussoren <[email protected]> Mon, 19 Nov 2012 10:32:20 +0100
| Newsgroups | gmane.comp.python.pyobjc.devel |
|---|---|
| Message-ID | <[email protected]> |
On 17 Nov, 2012, at 2:41, Kunal Parmar <[email protected]> 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 > [email protected] > https://lists.sourceforge.net/lists/listinfo/pyobjc-dev ------------------------------------------------------------------------------ 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 [email protected] https://lists.sourceforge.net/lists/listinfo/pyobjc-dev