Thomas Heller schrieb: > Kelie schrieb: >> Hello, >> >> I noticed the argument order in an event handler in comtypes is reversed when >> compared with VB reference. For example: >> >> Excel's Application object has a WindowResize event and according to the VB >> reference, the syntax is: >> Private Sub object_WindowResize(ByVal Wb As Excel.Workbook, ByVal Wn As >> Excel.Window) >> >> But in comtypes, the syntax would be: >> def onWindowResize(self, this, Wn, Wb) >> >> The order of Wn and Wb is reversed. Is this intended? > > No, it is not intended. However, there is no quick fix for this bug, > since the event handlers on other interfaces (InternetExplorer for example) > are called with the correct argument order. I suspect there is an obscure > flag > on the interface or something like that; I still have to find out.
I finally found the bug - the arguments are passed as 'named' arguments by Excel and Word to the event handlers, and comtypes does not handle the different order correctly. I do not yet have a fix but will work on it. -- Thanks, Thomas ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ comtypes-users mailing list comtypes-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/comtypes-users