Win32Com question - Property Let in VB

Max Barry max at ford-consulting.com
Fri Jun 20 11:45:55 EDT 2003


Hi, I have a vb ActiveX DLL that I wrote that contains a Let property that
keeps raising a error in python.  The Let property has two variables.  An
index and a value.  The error that is raised is: TypeError: Value() takes at
most 2 arguments (3 given).
An example of the python:
 class someclass:
    def foo(self):
	TheObject = MyObject.MyClass
	self.test(TheObject)

    def test(self, Result):
        Result.Value(int(1), 10)

This is the property that Python calls:
Public Property Let Value(ByVal lngIndex As Long, ByVal sngNew As Single)
    msngValues(lngIndex) = sngNew
End Property
Where msngValues is an array of Singles and lngIndex  is its index.  Any
ideas on what I am doing wrong?
Thank you,
--Max







More information about the Python-list mailing list