Book Image

LiveCode Mobile Development Cookbook

By : Dr. Edward Lavieri
Book Image

LiveCode Mobile Development Cookbook

By: Dr. Edward Lavieri

Overview of this book

Table of Contents (17 chapters)
LiveCode Mobile Development Cookbook
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Masking user passwords


When users enter their password, it should not be visible to anyone who might happen to be looking over the user's shoulder. This is an expected level of security. As shown in the following screenshot, not masking the password is unacceptable. This recipe shows you a method of masking the user's password as it is entered.

How to do it...

To accomplish our task, we will create two labels (one for the username and one for the password), three text entry fields (one for the username, a second for the unmasked password, and the third for the masked password). The masked password is the one we want displayed on the screen:

  1. Create a Username: label for content.

  2. Create a Password: label for content.

  3. Create a text entry field and name it fldUsername.

  4. Create a text entry field and name it fldMaskedPassword.

  5. Create a text entry field and name it fldUnmaskedPassword. Set this field's visible property to false.

  6. Add the following code to the fldMaskedPassword field:

    on keydown pKey
      put...