moai.DoMethod -- run method on MOAI object
r = moai.DoMethod(id$, method$, ...)
This function can be used to run a method on the specified MOAI object. You have to pass the identifier of the MOAI object in the first argument and the name of the method in the second argument. Method and object IDs are case insensitive, i.e. it does not matter if you use upper or lower case characters.

The methods that you can use with this function depend on the class of the specified MOAI object. Have a look at the class reference to see what methods are supported by the different MOAI classes.

Also, the arguments that you have to pass to this function after the method name depend on the method. They are different for every method. The same is true for return values. Some methods return values, some do not. Please refer to the class reference to see which arguments your method requires and whether there are return values for your method.

identifier of MOAI object to run method on
method name as a string
additional arguments depend on the method (see class reference for details)
return value depends on method type
moai.DoMethod("my_listview", "insert", "bottom", "Last entry")
The code above adds a new entry named "Last entry" to the bottom of the listview using the identifier "my_listview". This is done by running the Listview.Insert method on the listview object.

Show TOC