Re: Limiting data entry in fields

2010-11-30 Thread Richard Gaskin
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

Re: Limiting data entry in fields

2010-11-29 Thread Jan Schenkel
--- 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:

Re: Limiting data entry in fields

2010-11-29 Thread Monte Goulding
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

Re: Limiting data entry in fields

2010-11-29 Thread Bob Sneidar
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

Re: Limiting data entry in fields

2010-11-29 Thread charles61
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

Re: Limiting data entry in fields

2010-11-29 Thread charles61
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

Re: Limiting data entry in fields

2010-11-29 Thread Devin Asay
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

Re: Limiting data entry in fields

2010-11-29 Thread charles61
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

Re: Limiting data entry in fields

2010-11-29 Thread J. Landman Gay
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

Re: Limiting data entry in fields

2010-11-29 Thread Devin Asay
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 >>> >> _

Re: Limiting data entry in fields

2010-11-29 Thread Bob Sneidar
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

Re: Limiting data entry in fields

2010-11-29 Thread charles61
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. > > &

Re: Limiting data entry in fields

2010-11-29 Thread Bob Sneidar
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

Re: Limiting data entry in fields

2010-11-29 Thread Mike Bonner
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

Re: Limiting data entry in fields

2010-11-29 Thread Andrew Kluthe
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

Re: Limiting data entry in fields

2010-11-29 Thread Terry Judd
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

Limiting data entry in fields

2010-11-29 Thread charles61
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