Page 1 of 1

Filtered and Masked Input - Beta testing needed

Posted: Thu Jun 03, 2004 3:49 pm
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

Interested

Posted: Sun Jun 06, 2004 7:10 pm
by xstreur
Hi TerryHough,

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

Let me know. :D

Thanx Frans (xstreur)

Posted: Sun Jun 06, 2004 11:17 pm
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 :)

Re: Interested

Posted: Mon Jun 07, 2004 2:06 pm
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

Posted: Mon Jun 07, 2004 2:43 pm
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

great code

Posted: Mon Feb 19, 2007 5:06 pm
by quasiperfect
great demo any updated version for pb 4.02 ?
thanks in advance for any response