Re: [Pythonmac-SIG] py2app bug with argv_emulation=True

2012-06-03 Thread Michael O'Donnell
Dear Kevin, I don't know why, but your code works for me today, even stripped of the time.sleep(). The initial openDoc event is caught by doOpenFile. I must have slipped up somewhere. Note that the doOpenFile(sys.argv[1]) line was not needed, because without argv_emulation, the clicked file is

Re: [Pythonmac-SIG] py2app bug with argv_emulation=True

2012-06-02 Thread Kevin Walzer
On 6/2/12 9:24 PM, Michael O'Donnell wrote: Kevin, Seems we are not understanding each other. When a user double clicks on a document associated to the app, the app is launched. With argv emulation, I could read sys.argv to find which document was clicked on. With openDocument events, the do

Re: [Pythonmac-SIG] py2app bug with argv_emulation=True

2012-06-02 Thread Kevin Walzer
You may need to initialize the create command bits later in the app to avoid the open doc event getting swallowed up during startup... Sent from my iPhone On May 31, 2012, at 7:47 AM, "Michael O'Donnell" wrote: > Hi Kevin, Ronald, > > I must be missing something. I have inserted the discuss

Re: [Pythonmac-SIG] py2app bug with argv_emulation=True

2012-05-31 Thread Michael O'Donnell
Hi Kevin, Ronald, I must be missing something. I have inserted the discussed code into a test file (test.py) as follows: -- import sys from Tkinter import * import tkMessageBox def doOpenFile(*args): for arg in args: tkMessageBox._show(message=str(arg), type="ok

Re: [Pythonmac-SIG] py2app bug with argv_emulation=True

2012-05-30 Thread Kevin Walzer
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 un

Re: [Pythonmac-SIG] py2app bug with argv_emulation=True

2012-05-30 Thread Kevin Walzer
On 5/30/12 3:12 AM, Ronald Oussoren wrote: 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 h

Re: [Pythonmac-SIG] py2app bug with argv_emulation=True

2012-05-30 Thread Ronald Oussoren
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,

Re: [Pythonmac-SIG] py2app bug with argv_emulation=True

2012-05-28 Thread Michael O'Donnell
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

Re: [Pythonmac-SIG] py2app bug with argv_emulation=True

2012-05-28 Thread Ronald Oussoren
On 26 May, 2012, at 17:10, Chris Barker wrote: > On Fri, May 25, 2012 at 5:34 PM, Michael O'Donnell wrote: >> He found that if you set argv_emulation to False, the program >> worked as expected. >> >> NOW, I need argv_emulation, since a user might open my application by >> double clicking on a

Re: [Pythonmac-SIG] py2app bug with argv_emulation=True

2012-05-26 Thread Chris Barker
On Fri, May 25, 2012 at 5:34 PM, Michael O'Donnell wrote: > He found that if you set argv_emulation to False, the program > worked as expected. > > NOW, I need argv_emulation, since a user might open my application by > double clicking on a document associated with my program.  I don't want to > l