> 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)

Try using "vm.SetObjectDoubleArrayValue(...).  If you run makepy over the
object and view the generated file, you should notice the "Set" function
generated with a comment indicating it is really a property but has been
transformed into a method.

> 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)

This may be a reference counting error or other bug in the COM object.
Pythonwin may be creating a second instance of the object before it has
released the existing one.

Mark.

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

Reply via email to