Patches item #725608, was opened at 2003-04-22 21:58
Message generated for change (Comment added) made by mhammond
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=551956&aid=725608&group_id=78018
Category: None
Group: None
>Status: Closed
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
----------------------------------------------------------------------
>Comment By: Mark Hammond (mhammond)
Date: 2003-10-23 11:25
Message:
Logged In: YES
user_id=14198
The next win32all will have much better __iter__ support,
but done slightly differently than your patch. Please test
the semantics out when the next version is released, and
open a bug if there is still an issue. Thanks!.
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=551956&aid=725608&group_id=78018
|