[demo version] String->Double?
BlitzMax Forums/BlitzMax Beginners Area/[demo version] String->Double?
| ||
I'm looking for a way to convert "TextFieldText$(gadget)" into a double for use with a spinner gadget, but when I try to use "Double[TextFieldText$(gadget)]" it tells me that it's "Unable to convert from 'String Array' to 'Double'". I'm using the demo version as I said in the tiltle. Thanks for your time! |
| ||
Try using normal brackets instead of the square onesDouble(TextFieldText$(gadget)) note syntax of TextFieldText$ should be Function TextFieldText$( textfield:TGadget ) |
| ||
Worked. Thanks! :) |
| ||
Or simply TextFieldText(gadget).toDouble() Additionally, you may want to be sure that no non-numeric values are written to the TextField. |