On 3/16/05 3:44 PM, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote:
> sez [EMAIL PROTECTED]:
>> I like that idea of:
>>
>> on keydown tKey
>> if tKey is a number then
>> pass keydown
>> else
>> beep
>> end if
>> end keydown
>>
>> Is it ok to put it in the main stack rather then puting it just for
>> the fields.
> That depends on what you want the user to be able to do with the stack.
> Put that handler in the main stack script, and the user can NEVER type a
> non-numeral character into ANY field in that stack. Is that what you want? If
> you
> want *some* fields to be number-restricted, while others are normal, you could
> put that handler into the script of the appropriate card(s). If the
> number-restricted fields are all part of the same group, you can put that
> handler into the
> script of that group, and it will affect only the fields you want, while
> leaving everything else alone.
Better yet would be to assign a user property to those fields (like
"uNumbersOnly"), give it a value (like "true") and then check it in the
keydown handler, like:
on keydown tKey
if the uNumbersOnly of the target = "true" then
if tKey is a number then
pass keydown
else
beep
end if
else
pass keydown
end if
end keydown
HTH,
Ken Ray
Sons of Thunder Software
Web site: http://www.sonsothunder.com/
Email: [EMAIL PROTECTED]
_______________________________________________
use-revolution mailing list
[email protected]
http://lists.runrev.com/mailman/listinfo/use-revolution