Been learning some Javascript and was excited after I got a debug message to display this.value. however, i want to create some generic functions that I can use the parameters I call those functions within to get the value of that parameter and set the value of that parameter. I couldn't seem to figure this out. is there a javascript method or OGscript method that allows me to get "THIS" parameter's name?
for instance:
/*function that can be placed in any parameter to prevent negative values. however, this code gives me a errors.*/
checkingNeg(this.value) {
if (this.value < 0) {
params.setValue(this, 0, 0);
}
}
hope this makes sense, and if someone knows a better way to do this than using THIS, then that's cool too. thanks for any help. this community is awesome!