Problem with toString()

Problem with toString()


I'm using toString() to validate a time entry in my app.  For example - entries are only allowed in increments of .25, so I take a decimal number and split it on the decimal point using the following two lines:


input_hours = ((input.Hours.toString()).getPrefix(".")).toLong();
input_minutes = ((input.Hours.toString()).getSuffix(".")).toLong();




This works fine, except if i switch into Script Builder view, it automatically converts the above lines into this:


input_hours = (input.Hours.getPrefix(".")).toLong();
input_minutes = (input.Hours.getSuffix(".")).toLong();




Which then throws an error, because you can't getPrefix() a decimal type number.  I can work around this by not switching over into Builder view, but this is really irritating and causing a lot of silly extra work for me - is there any way you could fix it?

Thank you!