Registers a Xojo function to expose to Python via this class
- Name of the function as Python should see it. This name does not have to be same as the name of the Xojo function.
- Address of the Xojo function that should by called from Python.
The parameters and return value must always be as follows:
SomeFunctionName(pySelf as Ptr, pyArgs as Ptr) as Ptr
Example function in Xojo with correct function parameters and result value:
Dim params as Python3Parameters = new Python3Parameters(pyArgs)
if params.Count = 4 then // since classes send 1 extra param
MsgBox "Constructed class with 3 parameters"
Python3Script.SetError(Python3ErrorTypes.TypeError,"Constructor of MyXojoClass must have exactly 3 parameters")
return Python3Result(new Python3Result()).GetPtr()