character @ not hidden

Got a LiveCode personal license? Are you a beginner, hobbyist or educator that's new to LiveCode? This forum is the place to go for help getting started. Welcome!

Moderators: heatherlaine, Klaus, FourthWorld, kevinmiller

Post Reply
link76
Posts: 76
Joined: Fri Nov 04, 2011 1:52 pm

character @ not hidden

Post by link76 » Fri Dec 29, 2017 11:11 am

Hi Guys

I use this code on password field for environment mobile, it works correctly, but if I type the @ character it is not hidden :roll:

Code: Select all

on keyDown pKey
   
   if the length of me >= 15 then
      ...
   else
      put numToCodePoint(9679) after me
      put pKey after fld "hidden_psw1"
   end if
   
end keyDown

jmburnod
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 2149
Joined: Sat Dec 22, 2007 5:35 pm
Location: Genève
Contact:

Re: character @ not hidden

Post by jmburnod » Fri Dec 29, 2017 1:54 pm

Hi,
It happens for all chars when optionkey is down.
and pKey is not typed in fld ""hidden_psw1"
(LC 8.1.6, osx 10.12.3)
A quick and dirty way here:

Code: Select all

on keyDown pKey
   if the length of me >= 15 then
      
   else
      put pKey after fld "hidden_psw1"
      put numToCodePoint(9679) after fld "ftext"
   end if
end keyDown

on textchanged
   if the optionkey is down then
      put char -1 of fld "fText" after fld "hidden_psw1"
      put numToCodePoint(9679) into char -1 of fld "ftext"
   end if
end textchanged
Best regards
Jean-Marc

quailcreek
Posts: 688
Joined: Sun Feb 04, 2007 11:01 pm
Location: McKenna, WA

Re: character @ not hidden

Post by quailcreek » Sat Dec 30, 2017 12:10 am

If you're working on a mobile app, might I suggest using a native input control, rather than a field, and setting the contentType to password. Look up mobileControlSet in the dictionary.

Native Input Control Set to Password.livecode.zip
(2.28 KiB) Downloaded 13 times
Tom
MacBook Pro OS High Sierra 10.13.3

link76
Posts: 76
Joined: Fri Nov 04, 2011 1:52 pm

Re: character @ not hidden

Post by link76 » Tue Jan 02, 2018 10:59 am

thank you !

Post Reply

Return to “Getting Started with LiveCode - Complete Beginners”