> Kevin Walzer wrote: > >> You don't pass self to a bound method in Python. Delete the ('----', 'self', >> ...) tuple. > > My app crashes when I do that. Here's the error message: > > TypeError: Can't install event handler 'CoKvdman': expected 2 parameters > but function 'getDomain' has 1.
Ah, that would be a bug in aemreceive then. When you can installeventhandler it checks the function object's argument names list. It doesn't check it's an unbound function or bound method, however, so doesn't realise it should ignore the first argument name when validating the tuples that represent your AE-to-Python parameter bindings. I'll need to fix that, but it won't be soon as I'm really busy. For now, try commenting out the relevant validation code in aemreceive.main._processArgDefs: if len(argNames) != len(argDefs): raise TypeError, "Can't install event handler %r: expected %i parameters but function %r has %i." % (eventCode, len(argNames), callback.__name__, len(argDefs)) HTH has -- Control AppleScriptable applications from Python, Ruby and ObjC: http://appscript.sourceforge.net _______________________________________________ Pythonmac-SIG maillist - Pythonmac-SIG@python.org http://mail.python.org/mailman/listinfo/pythonmac-sig