I'm using a COM object, where some methods are implemented as
properties. The problem arises when I want to assign a value to
properties that use parameters...
Example....
# vm is the COM object I'm using
InitFractions = (0.25, 0.25, 0.25, 0.25)
vm.ObjectDoubleArrayValue(0, 1, -4) = InitFractions
This last line, wont run because it has a syntax error (can't assign to
function call)

on the other hand, the call....
InitFractions = vm.ObjectDoubleArrayValue(0, 1, -4)
works just fine.

What I did as a quick workaround was to make a COM object in VB (as a
.dll) that I use in my Python code as follows...
supportObj.ObjectDoubleArrayValue(vm, 0, 2, -4, InitFractions)
so... I need to define every property I need in the VB dll

I'm thinking on implementing a more generalized COM object in VC++
whenever I have more time... but before I do it I wanted to ask if
anyone has a better answer for this issue.

Thank you
Raul Cota
BTW.... some other properties, make the whole PythonWin to crash with a
memory error, just by pressing the import/reload button or running the
script. For instance...
objVal = vm.MultipleObjectDoubleValues(0, 1, (-1, -2))  #Which is
analogous to another property assignment that does work !!!
Any thoughts on this???? (Same behaviour using or not using the make py
utility)

_______________________________________________
ActivePython mailing list
[EMAIL PROTECTED]
http://listserv.ActiveState.com/mailman/listinfo/activepython

Reply via email to