Hi There
I´ve build a GUI with an edittext box where I want to put in numbers, to use them later for calculating, generating layers and so on.
But I always come along with NaN (Not a Number).
Script example:
var myWin = new Window("palette","Create a number of layers in a circle",undefined);
myWin.orientation = "column";
var groupOne = myWin.add("group", undefined, "GroupOne");
groupOne.orientation = "row";
groupOne.add("statictext", undefined, "Number of Pieces");
var inputNumber = groupOne.add("edittext", [0,0,40,20], "6");
How can I convert this edit text (6) from that string to a number, so that I can use it?
And, have I to check, that my input text is a number?
THX for your help ....