I've run into another problem and I'm not entirely certain how to get around it or what is causing it. I am checking if a specific key is pressed when a control is active:
PHP Code:
function CONTROLNAME.onKeyDown(keycode, keytext, scancode) {
if (keytext == "d") {
this.option = CONTROLNAME.getselectedrow();
CONTROLNAME.destroy();
}
}
But for whatever reason this block of code repeats multiple times before exiting the script. This is a problem as obviously the control is deleted, so this.option will be overwritten and return 0.