Proper Field Validation Methods and other annoyances...
Kay C Lan
lan.kc.macmail at gmail.com
Wed Aug 15 00:00:38 CDT 2007
On 8/15/07, Len Morgan <len-morgan at crcom.net> wrote:
> 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
> known problem?
Sorry, now solution to this, I just wanted to add that I've seen both of
these. I can't create a repeatable recipe yet, but coincidently for me it
involves date validation. I have a couple of self-calling functions that
check for format. They are self-calling in that if you get the format wrong
'on closeField' the function pops up a dialog box where you can correct your
mistake, it then calls itself to check that 2nd (3rd, 4th....) time around
you got it right. I seem to see this problem more often if I 'intentionally'
make a double mistake and click "Cancel" which causes an "exit to top",
leaving the input field empty with a cursor and the 'next' field active with
a cursor also.
> I'm afraid of the "script eating tendency" of Galaxy if you dare to
> to use another editor. I've lost countless days of work to this
I've had this explained to me. Simply Galaxy can't keep aware of what you
might do in the Rev IDE script editor so on a 'per session' basis you should
use one or the other. If you need to change from Galaxy to the IDE Script
Editor or visa versa, save your work, change the Galaxy prefs as necessary,
Quit and Restart Rev. Those 'where did all my changes go' moments
disappeared once I adopted this simple procedure:-)
I will say though that I very much doubt that the problem you are
experiencing has anything to do with Galaxy. I've been running 'sans Galaxy'
for a while now but still have double insertion points crop up very
occasionally. This is only within the IDE, I don't do much with standalones
so this may well be an IDE only problem.
More information about the use-livecode