Cody Precord wrote:
> Hello,
> 
> On Jul 10, 2009, at 10:35 PM, Brendan Simon (eTRIX) wrote:
> 
>> Brendan Simon (eTRIX) wrote:
>>>>
>>
>> I registered the __geturl() event handler but it never gets called.
>>
>> How can I determine if the events are being sent to MyApp ??
>> I tried:
>>  $ export AEDebugSends=1; export AEDebugReceives=1
>>  $ open myapp:xyz
>>
>>
>> Obviously some event is causing MyApp to open when I type "open
>> myapp:xyz", but does that actually mean MyApp will receive the event or
>> just some internal framework that causes the application to be
>> launched ??
> 
> Did you see my previous reply (I see it in the archives but not in your
> replies)? Here it is again.
> 
> The wx.App object has some builtin method for handling some common
> apple events. I would have to check the wxWidgets source to remember
> exactly which event it responds to but you might want to try and
> override the following method in your App object class.
> 
> def MacOpenFile(self, filename)
> 
> IIRC it will be called with the path of the file that is sent to the
> app for getURL events. If not you need a c extension to add an
> additional apple event handler to your wxApp object. This is actually
> quite easy to do (see examples in wxPython wiki), but I think that the
> above should do what your
> looking for.

Hi Cody,

Yes I did see your previous reply.  I implemented the MacOpenFile()
method as part of MyApp but it never got called.

It didn't work for me.

Google searches seemed to suggest that this only worked for applications
that were already running, rather than a file that causes an application
for be launched.

Also, it may not be called for URLs which is what I'm using.

You mention a C extension may be needed.  I will have a look on the
wxPython wiki ... as you suggest :)

Brendan.

begin:vcard
fn:Brendan Simon
n:Simon;Brendan
org:eTRIX pty ltd
adr:;;PO Box 306;St Kilda;VIC;3182;Australia
email;internet:brendan.si...@etrix.com.au
title:Managing Director
tel;work:+61-417-380-984
tel;cell:+61-417-380-984
x-mozilla-html:TRUE
version:2.1
end:vcard

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

Reply via email to