On 11/03/11 10:04 AM, Brendan Simon (eTRIX) wrote:
> NOTE: for some reason the AppleEvent constants kAEInternetSuite and
> kAEISGetURL does not work as they are set to 'gurl' (lowercase). 
> However using 'GURL' does work :)
>
> Cheers, Brendan.

Was thinking it may be "nicer" to convert the constants to upper case
rather than having a magic string ??

-            AE.AEInstallEventHandler('GURL', 'GURL', self.__geturl)
+            AE.AEInstallEventHandler(kAEInternetSuite.upper(), 
kAEISGetURL.upper(), self.__geturl)


-            AE.AERemoveEventHandler('GURL', 'GURL')
+            AE.AERemoveEventHandler(kAEInternetSuite.upper(), 
kAEISGetURL.upper())

or

    kAEInternetSuite = kAEInternetSuite.upper()

    kAEISGetURL = kAEISGetURL.upper())


I'm not fussed either way, as long as it works :)

Cheers, Brendan.

_______________________________________________
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