On 11/29/10 4:27 PM, charles61 wrote:

Mike,

I have not thought of using "not in". I did not use "1234567890"
because it does not limit decimals.

I think it should be "is in" instead of "is not in". As written, it will allow any keys except numbers.

I'd do:

on keydown pKey
 if (pKey is a number or pKey = ".") and len(me) < 3
 then pass keydown
end keydown

You don't have to worry about carriage returns, they aren't trapped by keydown. Set the field's autotab to true if you want carriage returns to tab out of the field.

--
Jacqueline Landman Gay         |     jac...@hyperactivesw.com
HyperActive Software           |     http://www.hyperactivesw.com

_______________________________________________
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Reply via email to