Jan Schenkel wrote:
> Seriously, this is an old question that keeps coming back, and a
> prime candidate for either an engine-level field "mask", or a
> community effort to write a behavior script that handles the corner
> cases and is readily available for download.
Indeed it is. I've been try
--- On Mon, 11/29/10, Monte Goulding wrote:
> Hi Charles
>
> I'm a little confused about your requirements. Did you want
> to allow decimals or not? Here's some code copied from one
> of my behavior scripts. You only need to modify the one
> function to impose whatever data entry limits you like:
Hi Charles
I'm a little confused about your requirements. Did you want to allow decimals
or not? Here's some code copied from one of my behavior scripts. You only need
to modify the one function to impose whatever data entry limits you like:
on keydown pKey
if checkText(getNewText(pKey)) the
n Gay [via Runtime Revolution] wrote:
>
>> on keydown pKey
>> if (pKey is a number or pKey = ".") and len(me) < 3
>> then pass keydown
>> end keydown
>
>
> --
> View this message in context:
> http://runtime-revolution.278305.n4.nabble
keydown
--
View this message in context:
http://runtime-revolution.278305.n4.nabble.com/Limiting-data-entry-in-fields-tp3064388p3064670.html
Sent from the Revolution - User mailing list archive at Nabble.com.
___
use-livecode mailing list
use-livecode@list
vecode mailing list
> [hidden email]
> Please visit this url to subscribe, unsubscribe and manage your subscription
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
>
>
> View message @
> http://runtime-revolution.278305.n4.nabble.com/Limiting-d
On Nov 29, 2010, at 3:46 PM, charles61 wrote:
>
> Devin,
>
> Thanks! I found it but I had to limit numbers with decimals. The numbers only
> script does not do that.
>
> Charles Szasz
> csz...@mac.com
Ah, I misunderstood. I thought you meant that you wanted to disallow typing in
decimal poin
t;
> >>> pass keyDown
> >>>
> >>> end if
> >>>
> >>> end if
> >>> end keyDown
> >>>
> >>> This should make it so that everytime a key is pressed in that field it
> >>> counts how ma
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 n
code mailing list
>>> [hidden email]
>>> Please visit this url to subscribe, unsubscribe and manage your
>>> subscription preferences:
>>> http://lists.runrev.com/mailman/listinfo/use-livecode
>>>
>> _
1234567890" then
>>>
>>> pass keyDown
>>>
>>> end if
>>>
>>> end if
>>> end keyDown
>>>
>>> This should make it so that everytime a key is pressed in that field it
>>> counts how many characters
his should make it so that everytime a key is pressed in that field it
> > counts how many characters it has, if it is less than 3 it checks to see if
> > it is a number or in the allowed list, if so it passes that key.
> >
&
s to see if
> it is a number or in the allowed list, if so it passes that key.
>
> --
> View this message in context:
> http://runtime-revolution.278305.n4.nabble.com/Limiting-data-entry-in-fields-tp3064388p3064535.html
> Sent from the Revolution - User mailing list archive at N
ters it has, if it is less than 3 it checks to see if
> it is a number or in the allowed list, if so it passes that key.
>
> --
> View this message in context:
> http://runtime-revolution.278305.n4.nabble.com/Limiting-data-entry-in-fields-tp3064388p3064535.html
> Sent from the Revolut
it
counts how many characters it has, if it is less than 3 it checks to see if
it is a number or in the allowed list, if so it passes that key.
--
View this message in context:
http://runtime-revolution.278305.n4.nabble.com/Limiting-data-entry-in-fields-tp3064388p3064535.html
Sent from the Revo
Not perfect but should get you started...
on keyDown theKey
put "0123456789" into tKeys
if tKeys contains theKey then
if length (me) < 3 then
put theKey after me
end if
end if
end keyDown
Terry...
On 30/11/10 7:51 AM, "charles61" wrote:
>
> How do I limit data e
How do I limit data entry to only three digits and no decimals in a numerical
data entry field?
--
View this message in context:
http://runtime-revolution.278305.n4.nabble.com/Limiting-data-entry-in-fields-tp3064388p3064388.html
Sent from the Revolution - User mailing list archive at Nabble.com
17 matches
Mail list logo