MattB Posted October 10, 2018 Share Posted October 10, 2018 Why can I click and change the text in the right InputText box but when I assign the starting value as a variable on the left, it crashes? https://playground.babylonjs.com/#8J5XK5 Quote Link to comment Share on other sites More sharing options...
MattB Posted October 10, 2018 Author Share Posted October 10, 2018 Ok, it seems to work if I put the variable in quotes - instead of var endFrame = 119; use var endFrame = "119"; I wouldn't mind input into why this happens though Quote Link to comment Share on other sites More sharing options...
Guest Posted October 10, 2018 Share Posted October 10, 2018 Hello, this is because the inputText expects...text so string and not a number Quote Link to comment Share on other sites More sharing options...
Guest Posted October 10, 2018 Share Posted October 10, 2018 For instance substr function is called on it so we need text https://github.com/BabylonJS/Babylon.js/blob/master/gui/src/2D/controls/inputText.ts#L485 Quote Link to comment Share on other sites More sharing options...
Dad72 Posted October 10, 2018 Share Posted October 10, 2018 And after, converting the text into int with parseInt ("119"); Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.