> How do i retreive the value from an Fl_Int_Input and assign > it to my variable? I notice that the value() member still > reads the input as a char string, so i will need to convert > this manually, or is there another way provided to retrieve > the value as an integer?
No, you need to use strtol() or similar on the string. We don't do it automatically as it is not always obvious what radix the number is meant to be, but allowing the user to convert it via strtol() allows them to get the result they want. Note that I'd caution against using atoi() or something simple like that as it gives less control over the conversion applied, and does not check for errors as robustly as strtol() in general. > I thought that the Fl_Int_Input would provide an integer, but > i see it is named as that because it refuses any other input. Indeed. > Aside from this initial validation. do the Fl_Input types > require manual validation for the amount of characters > entered and/ or range for ints or floats? or again is there a > native feature for this? If you want some specific validation, you need to do this yourself. Again, it's the same problem really; when presented with a string of digits, the fltk lib will not necessarily be able to determine, for a given app on a given host platform or numeric radix, whether that's a "valid" numeric string or not. The app knows what "number" would be valid for any given input however (I assume!) so it is best that the app do the check itself. SELEX Galileo Ltd Registered Office: Sigma House, Christopher Martin Road, Basildon, Essex SS14 3EL A company registered in England & Wales. Company no. 02426132 ******************************************************************** This email and any attachments are confidential to the intended recipient and may also be privileged. If you are not the intended recipient please delete it from your system and notify the sender. You should not copy it or use it for any purpose nor disclose or distribute its contents to any other person. ******************************************************************** _______________________________________________ fltk mailing list [email protected] http://lists.easysw.com/mailman/listinfo/fltk

