Password field code to share?

Trevor DeVore lists at mangomultimedia.com
Tue Mar 21 08:16:05 EDT 2017


On Tue, Mar 21, 2017 at 4:48 AM Tiemo Hollmann TB via use-livecode <
use-livecode at lists.runrev.com> wrote:

>
> there have been several solutions for password fields around the community
> (Eric Chatonet, .), but all I have seen so far are not complete (e.g. no
> copy/paste) or safe in handling or not fully handling all chars. The most
> comprehensive solution I have seen is based on the input of "rawKeyDown the
> Key" getting the chars, replacing them by asterisk or bullets and storing
> the clear password in a custom property. But that solution has a pitfall,
> it
> doesn't works with non standard ASCII characters, like German umlaute,
> because  you can't  retrieve the original char from numToChar(theKey) for
> theses non standard ASCII chars.
>
> Before inventing the wheel again, I wanted to ask, if anybody has a
> sophisticated piece of code for handling a password field willing to share?
> "Ask password" is not a solution for my case because the password field is
> part of a form.


I use a custom font that displays all characters as a bullet. Benefit is
that you continue to access the text property of the field to get the
password. I use some code to prevent cut/copy and filter certain types of
input. You can tweak as necessary. I have a tutorial with links and an
explanation:

http://revolution.screenstepslive.com/s/revolution/m/how-to/l/249-creating-a-password-field

-- 
Trevor DeVore



More information about the use-livecode mailing list