[pywin32-bugs] [ pywin32-Patches-725608 ] Modification made to have enum working under .NET
OLD project page for the Python extensions for Windows
Brought to you by:
mhammond
From: SourceForge.net <no...@so...> - 2003-04-22 11:58:15
|
Patches item #725608, was opened at 2003-04-22 11:58 Message generated for change (Tracker Item Submitted) made by Item Submitter You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=551956&aid=725608&group_id=78018 Category: None Group: None Status: Open Resolution: None Priority: 5 Submitted By: Marc ENGEL (marcengel) Assigned to: Nobody/Anonymous (nobody) Summary: Modification made to have enum working under .NET Initial Comment: In order to get enum working with .NET wrapped enum, I had to modify the code of __getitem__ from class CDispatch in dynamic.py. Indeed the "for" loop tries to access all index until it gets an IndexError but when trying to access an non-existent index under .NET, I got this error from mscorlib: (-2147352567, "Une exception s'est produite.", (0, 'mscorlib', "L'index \xe9tait hors limites. Il ne doit pas \xeatre n\xe9gatif et doit \xeatre inf\xe9rieur \xe0 la taille de la collection.\r\nNom du param\xe8tre\xa0: index", None, 0, -2146233086), None) The error message translated is: "index out of bounds. It must not be negative or less than the collection size. Parameter name: index" In order to get the for loop working, I modified the code to raise an IndexError and it works. Hope it will help ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=551956&aid=725608&group_id=78018 |