Page 1 of 1

character @ not hidden

Posted: Fri Dec 29, 2017 11:11 am
by link76
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

Re: character @ not hidden

Posted: Fri Dec 29, 2017 1:54 pm
by jmburnod
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

Re: character @ not hidden

Posted: Sat Dec 30, 2017 12:10 am
by quailcreek
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 158 times

Re: character @ not hidden

Posted: Tue Jan 02, 2018 10:59 am
by link76
thank you !