TypeError: Value() takes at most 2 arguments (3 given)

vincent wehren v.wehren at home.nl
Thu Jun 19 21:06:25 CEST 2003


"Max Barry" <max at ford-consulting.com> schrieb im Newsbeitrag
news:mailman.1056044255.14205.python-list at python.org...
> I am having problems calling a VB6 let property from a class in python.  I
> get a TypeError: Value() takes at most 2 arguments (3 given).  I presume
the
> self is being passed as the 3rd argument.  Here is an example of the
class:
>
> class someclass:
>     def foo():
How's about:

   def foo(self):
       self.test(somevbobject)

Regards,
Vincent Wehren


> self.test(somevbobject)
>
>     def test(self, Result):
>         Result.Value(1, 0)
>
>
> This is the VB property that python calls:
> Public Property Let Value(ByVal lngIndex As Long, ByVal sngNew As Single)
>     ' Notice: presumed to be zero-based values
>     msngValues(lngIndex + 1) = sngNew
> End Property
>
> Does anybody know how to resolve this problem?
>
> Thanks in advance,
> Max
>
>
>
>
>






More information about the Python-list mailing list