On 29 May, 2012, at 2:14, Michael O'Donnell wrote:

> Dear Ronald, Chris,
> 
> > Perhaps argv emulation isn't the only way to support this. Does
> > tkInter on the Mac Support the Mac-specific events? For example,
> > wxPython has mac-specific events you can catch for files dropped on
> > the app, or selected at startup -- so argv emulation isn't required.
> > Maybe Tk doesn't have those, but it's worth a look.
> 
> +1 on this, it is better to use the Tkinter support for this instead of the 
> argvemulation hack (which is mostly meant to be used with command-line 
> scripts 
> The source code for idle show how you can add support for the open-file event 
>  to your application: 
> <http://hg.python.org/cpython/file/cb716ee277cc/Lib/idlelib/macosxSupport.py#l54>
> 
> Mick: That code will allow openDocument events to be received
> while my program is open. In my case, I want users to be able to
> LAUNCH my application by double-clicking on a document. The
> openDocument event is executed before my program opens,
> and thus before this patch is executed.

IDLE can be opened by double clicking on python files, the code I linked to 
should be responsible for implementing this. Also, the argv_emulation code uses 
the openDocument event to do its work (argv_emulation basicly runs a Carbon 
event loop until it has received some openDocument events or until a timeout 
occurs).

Ronald

>  
> That said, I will try to fix the py2app bug when I have some time.
> 
> Thanks. I know time is short and bugs consume time to fix.
> 
> Mick
>  
> 
> Ronald
> _______________________________________________
> Pythonmac-SIG maillist  -  Pythonmac-SIG@python.org
> http://mail.python.org/mailman/listinfo/pythonmac-sig
> unsubscribe: http://mail.python.org/mailman/options/Pythonmac-SIG
> 
> 

Attachment: smime.p7s
Description: S/MIME cryptographic signature

_______________________________________________
Pythonmac-SIG maillist  -  Pythonmac-SIG@python.org
http://mail.python.org/mailman/listinfo/pythonmac-sig
unsubscribe: http://mail.python.org/mailman/options/Pythonmac-SIG

Reply via email to