Input params of methods

Can you define input parameters for methods? So far i used globals and variables that i defined without the “var” infront to transfer values - it works, but this doesn’t really look right (and is risky, too…).
It obviously works with Servoy functions, i just couldn’t figure out how to do it with my own scripts…
Thanks!

Yes you can… It’s described in the Help function of Servoy :D Just browse around in the help function, looking for Methods and you’ll find the chapter on Passingvariables into methods.

As for how it works:

methodname(‘var1’,‘var2’) to pass the var’s

And in the method:

var 1 = arguments[0]
var 2 = arguments[1]

Paul