comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Re: validating user input
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Re: validating user input [message #44604] Tue, 05 July 2005 03:50 Go to next message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Soren wrote:

> Does someone know a smart way of validating nummerical input read
> from a text widget. I am thinking in terms of validating whether it is
> a number or not.
> Is the best thing just to catch the error if float(inputstring) fails?

It is sometimes easier to make sure the user can't type
anything BUT the kind of input you expect. See, for
example, FSC_FIELD:

http://www.dfanning.com/programs/fsc_field.pro

Cheers,

David
Re: validating user input [message #44703 is a reply to message #44604] Tue, 12 July 2005 23:19 Go to previous message
newsgroupie2003 is currently offline  newsgroupie2003
Messages: 12
Registered: December 2004
Junior Member
Cheers David - very usefull!

Soren
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Analayze AVW reader/writer
Next Topic: shading in contour plots

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 15:15:49 PDT 2025

Total time taken to generate the page: 0.00521 seconds