Limiting text input in a text entry field

Mark Schonewille m.schonewille at economy-x-talk.com
Sun Aug 17 07:56:49 EDT 2008


Hi Jinjenator,

Your script isn't wrong, but I'd do it slightly different:

constant dot = "."
on keyDown theKey
   if theKey is dot or theKey is a number
   then pass keyDown
end keyDown

--
Best regards,

Mark Schonewille

Economy-x-Talk Consulting and Software Engineering
http://economy-x-talk.com
http://www.salery.biz

Benefit from our inexpensive hosting services. See http://economy-x-talk.com/server.html 
  for more info.

On 17 aug 2008, at 13:46, Jinjenator wrote:

> Sorry to waste time - figuredout a way....
>
> on keyDown theKey
>  if theKey is "." then pass KeyDown
>  else if theKey is a number then pass KeyDown
>  else beep
> end keyDown
>




More information about the use-livecode mailing list