Filtered and Masked Input - Beta testing needed

Windows specific forum
TerryHough
Enthusiast
Enthusiast
Posts: 781
Joined: Fri Apr 25, 2003 6:51 pm
Location: NC, USA
Contact:

Filtered and Masked Input - Beta testing needed

Post by TerryHough »

For some time I have been seeking to gain more control over the
StringGadget as an input area. This topic is about that and a demo
linked later that I hope you will test and give me some feedback on.

Ultimately, I would like to see the StringGadget extended with two
more optional paramters, filter and mask.

Definitions:
"Filters" - allow the entry of only the characters that are present in the
defined filter. Filters can be very restrictive, but flexible, in application.

"Masks" - create the format of the entry and also determine the accepable
length of the input. Common masks include telephone number, social
security number, zipcode, etc.. Masks consist of a position defining character
and permanent placeholders.

A more detailed explanation is in the demo's help area.

Image

Image


References:
MaskedEdit in StringGadget - viewtopic.php?t=10929
Date Mask for StringGadget - viewtopic.php?t=4549&highlight=filters
Masking a String Gadget - viewtopic.php?t=13435&highlight=maskededit
and others if you search on "filter" or "mask" may apply.

The demo may be downloaded from:
http://elfecc.no-ip.info/purebasic/#MaskedInput

Feel free to download it and try it out. I would appreciate your feedback
and suggestions. I am certain it is not perfect :x and some extensions
are forthcoming.

I plan on making the source code available after further testing and
cleanup.

Thanks,
Terry
Last edited by TerryHough on Tue Aug 30, 2005 2:46 pm, edited 3 times in total.
xstreur
New User
New User
Posts: 7
Joined: Wed May 05, 2004 6:16 pm
Location: The Netherlands

Interested

Post by xstreur »

Hi TerryHough,

I'm interested in testing the functions.!!!!

Let me know. :D

Thanx Frans (xstreur)
PolyVector
Enthusiast
Enthusiast
Posts: 499
Joined: Wed Sep 17, 2003 9:17 pm
Location: Southern California
Contact:

Post by PolyVector »

Very nice job!
I tried to really give it a good testing for you and the only bug I could find was this:

-Go to the currency tab and type in a number like 123.45
-Go back and delete the decimal...

You can then enter invalid data... The same problem exists with all the masks....
Other than that, it seems pretty unbreakable :)
TerryHough
Enthusiast
Enthusiast
Posts: 781
Joined: Fri Apr 25, 2003 6:51 pm
Location: NC, USA
Contact:

Re: Interested

Post by TerryHough »

@xstreur
xstreur wrote: I'm interested in testing the functions.!!!!
You can download the demo from
<a href="http://www.electrofile.com/purebasic/ma ... ">Filtered and Masked Input Demo</a>

Terry
TerryHough
Enthusiast
Enthusiast
Posts: 781
Joined: Fri Apr 25, 2003 6:51 pm
Location: NC, USA
Contact:

Post by TerryHough »

@PolyVector

Thank you, and thanks for testing this.

Yes, there is a problem when a "placeholder" character that was inserted
by the mask is deleted. I haven't found a workable and acceptable
solution for that occurence yet.

It is pretty easy to insert the "placeholder" during the initial entry of data,
but reliable realignment with the mask after a "placeholder" is deleted is
proving a bit more difficult.

One current solution is to clear the entire field if a "placeholder" character
is deleted. That seems to be too drastic and isn't very user friendly.

The current code also allows pasting of data that contains an invalid
character. That is because I chose to make the filter routine speedier by
checking each character as it is entered, rather than checking every
character in the input area every time a character is received.

Thanks again for testing and I appreciate any suggestions you may have
to make this more functional.

Terry
quasiperfect
Enthusiast
Enthusiast
Posts: 157
Joined: Tue Feb 13, 2007 6:16 pm
Location: Romania
Contact:

great code

Post by quasiperfect »

great demo any updated version for pb 4.02 ?
thanks in advance for any response
Post Reply