Bugs item #1587023, was opened at 2006-10-30 09:19
Message generated for change (Comment added) made by j_lindvall
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=551954&aid=1587023&group_id=78018
Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: com
Group: None
Status: Open
Resolution: None
Priority: 8
Private: No
Submitted By: Johan Lindvall (j_lindvall)
Assigned to: Mark Hammond (mhammond)
Summary: ActiveScript, LazyDispatchItem doesn't rename properties
Initial Comment:
The problem seems to be that LazyDispatchItem doesn't
remap the
properties as DispatchItem does. If I disable the
LazyDispatchItem
generation in MakeOleRepr and always return a
DispatchItem object, the
script works as expected.
See the following thread for more information:
http://mail.python.org/pipermail/python-win32/2006-October/005174.html
----------------------------------------------------------------------
>Comment By: Johan Lindvall (j_lindvall)
Date: 2007-08-15 08:39
Message:
Logged In: YES
user_id=1585378
Originator: YES
This problem only occurs when working with a typed COM Object (not
IDispatch) wrapped by LazyDispatch. This is the case when running Python
Active Scripts and executing normal scripts without the gen_py interface.
When I use such an object with a Set property, Python uses the wrong
property name (with Set) when calling typecomp.Bind.
I've found a better solution:
Index: dynamic.py
===================================================================
--- dynamic.py (revision 36121)
+++ dynamic.py (working copy)
@@ -377,6 +377,8 @@
for i in ALL_INVOKE_TYPES:
try:
x,t = typecomp.Bind(attr,i)
+ if x==0 and (attr[:3] == 'Set' or attr[:3]
== 'Get'):
+ x,t = typecomp.Bind(attr[3:], i) #
strip get / set
if x==1: #it's a FUNCDESC
r =
olerepr._AddFunc_(typeinfo,t,0)
elif x==2: #it's a VARDESC
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=551954&aid=1587023&group_id=78018
|