This stack contains 3 fields: fORIGIN, fLIST and fOUTPUT
fLIST contains the list of permitted characters (in this case the consonants of the English alphabet).
The button will "bite" the first character from the string in fld fORIGIN and if it matches one of the letters in fld fLIST put it into fld 'fOUTPUT
This is horribly primitive and needs a REPEAT loop, but it proves its point.
Checking a textField against a list of permitted characters
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
-
- Livecode Opensource Backer
- Posts: 9389
- Joined: Fri Feb 19, 2010 10:17 am
- Location: Bulgaria
-
- Livecode Opensource Backer
- Posts: 9389
- Joined: Fri Feb 19, 2010 10:17 am
- Location: Bulgaria
Re: Checking a textField against a list of permitted charact
Here's a cleaned-up version, with a repeat loop.
There is an option to perform using fields
and
an option to use strings (which should, with great long strings be quicker).
There is an option to perform using fields
and
an option to use strings (which should, with great long strings be quicker).
- Attachments
-
- char_limiter.livecode.zip
- Newer version.
- (15.39 KiB) Downloaded 201 times