Hi Jonathan,
I have a field where I restrict it to only enter numbers...
But I had to include extra script to allow the character to be a "." or a "-", in case the number included a decimal point or minus sign:
On KeyDown theKey
If (isNumber(theKey) = true) or theKey = "." or theKey = "-" then pass keyDown
End KeyDown
ah, yes, sure...
But we non english speaking users do have another problem!
We use the "," (Comma) as a decimal separator, so we have to do some extra
work before we can compute some values... :-(
If somone is interested, i use these 2 little functions to do the conversations before
computing and displaying the result again:
function ohnekomma was ## german for without comma :-) replace "," with "." in was return was end ohnekomma
And back:
function mitkomma was ## german for with comma :-) replace "." with "," in was return was end ohnekomma
So i can: ... put mitkomma((ohnekomma(fld 1) * 12)) into fld "result" ...
Or a bit more readable ;-) ... put ohnekomma(fld 1) into mynumber1 put mynumber * 12 into myresult put mitkomma(myresult) into fld "result" ...
Regards
Klaus Major [EMAIL PROTECTED] http://www.major-k.de
_______________________________________________ use-revolution mailing list [email protected] http://lists.runrev.com/mailman/listinfo/use-revolution
