With Servoy 5.1, you need to name the parameters in the method signature, so instead of doing this:
- Code: Select all
function uploadMethod() {
var v_documentsid = arguments[0];
var v_version_number = arguments[1];
// do your stuff
}
you should write it this way:
- Code: Select all
function uploadMethod(v_documentsid, v_version_number ) {
// do your stuff
}
This is much cleaner, concise and less error prone, it will help reading your methods, and you can also add jsdocs to the header of your methods this way:
- Code: Select all
/**
* This method does some stuff...
*
* @param (Integer) v_documentsid the id of the document which represent this or that...
* @param (String) v_version_number the version number, used to do that or the other...
* @return something
*/
function uploadMethod(v_documentsid, v_version_number ) {
// do your stuff
}
Then you will benefit from code completion everywhere in Servoy, and when you type yourForm.uploadMethod, it will show you your comments and the parameters that are to be passed to the method.
And you can even generate html documentation out of it (see my
JSDocPlugin for this)!
Hope this clarifies,