restricting chars in a field
cowhead at mac.com
Thu Sep 26 12:03:50 CDT 2002
> Appreciate any suggestions that would replace the following script,
> that I used in SuperCard, to one in Revolution. Want to enter only
> certain chars into a field.
I'm sure there are many ways, but one way I have used to do this is to
use a CARD script, instead of a field, and only pass the keydown message
if the appropriate key is pressed
on keyDown whichkey
if the focusedObject is myField then -- this should let you have
different key restrictions for multiple fields on 1 card, but I never
got it to work :-) Requires long ID of the field...
if whichKey is theKeyYouWant then -- can also use 'is not' 'is among'
etc here, you don't need numToChar or anything here...just type the
keyname straight eg. "y"
More information about the use-livecode