fubeca6 Posted September 23, 2015 Share Posted September 23, 2015 Good afternoon all, I'm trying to capture user key presses... here's my code:// This is in my "create" functiongame.input.keyboard.addCallbacks(this, null, null, this.input);// ...input: function(char) { this.name += char; this.selection.setText(this.name); },Here's the error I'm getting: Uncaught TypeError: this.onPressCallback.call is not a function If anyone has any ideas, please let me know! Link to comment Share on other sites More sharing options...
rich Posted September 23, 2015 Share Posted September 23, 2015 Rename your input function to something else (onInput?) as it's likely you've overwritten one of the reserved state properties by calling it input. Link to comment Share on other sites More sharing options...
fubeca6 Posted September 23, 2015 Author Share Posted September 23, 2015 Hey Rich, thank you for the reply! Unfortunately I'm getting the same error even after changing the input function name Link to comment Share on other sites More sharing options...
rich Posted September 23, 2015 Share Posted September 23, 2015 Ahh I know what it is - this is a bug fixed in the 2.4.4-dev build, but for now just replace where you've got 'null' with 'undefined' and it'll work. Link to comment Share on other sites More sharing options...
Recommended Posts