Python3Script Xojo Plugin |
|
Python3XojoClass.Constructor Constructor
Constructor that takes name, method count and address of a init method.

Constructor(
name
as String,
methodCount
as UInt32,
initMethod
as Ptr)
Parameters
- name
- name of the class as Python should see it
- methodCount
- Number of methods that should be in the class.
- initMethod
- Address of the method that should represent the classes constructor.
Remarks
Note difference from our other PythonScript plugin which is for Python 2.7.x:
For Python 3.4.x then the constructor is not put in the method list, as it was done in 2.7.x
Note:
The method signature for the constructor method is not same as for the other methods.
Method signature for the initMethod is:SomeMethodName(pySelf as Ptr, pyArgs as Ptr, kwds as Ptr) as IntegerNote also since you get the self in separate parameter then you get exactly same amount of parameters as were sent into the constructor in the pyArgs block, as opposed to one extra that you normally get in the class functions you register.
See Also
Python3XojoClass Class