Proper Field Validation Methods and other annoyances...
len-morgan at crcom.net
Tue Aug 14 12:25:31 EDT 2007
I've having a few "issues" that I hope someone can answer for me:
1) Why does put "4" is a date return true? If this function doesn't
actually work, why is it still available? I'd like to be able to have
users enter a date without any kind of punctuation (i.e., 08142007) and
be able to validate it as a valid date. The same applies to entering
1315 as a time (no colon).
2) This is the "biggie." What is the proper way to validate the
contents of a field. I tried writing a "closeField" script that would
do the validation, put up a message box if the format/contents are
wrong, then set the focus back to the field for correction by the user.
I end up getting two insertion point cursors (one in the "bad" field and
one in the next field. The keyboard does go to the bad field but having
more than one insertion point is confusing to me let alone my end
users. By the way, I have tried not passing the closeField message but
I'm not sure if the "tab to next field" takes place anyway.
3) Related to #2 above, I frequently get vertical lines (insertion point
cursors) in a field as I move the mouse across it. Once they start
showing up, (and they stay so I end up with vertical bars between every
letter in the field!), I can get them to appear by moving the mouse
ABOVE the field (not in it) like I have a vertical line that runs the
height of the entire screen. Is this something I'm doing or is it a
It should be noted that I'm using Galaxy. I'd try switching back to the
Rev IDE except that I can't seem to remove Galaxy (even following their
instructions. It's like a bad rash - it just keeps coming back!), I'm
afraid of the "script eating tendency" of Galaxy if you dare to attempt
to use another editor. I've lost countless days of work to this "feature."
#2 is the most important and probably of use to the most people. #1
should have never seen the light of day I could write my own routine if
I had to.
Thanks in advance for listening to my whining. (sp?)
More information about the Use-livecode