Making a password field (or how do I get index of selection)
Posted: Wed Jan 18, 2012 7:04 pm
There are so many great things about LiveCode, I'm a bit mystified when I run across holes like the lack of a 'password' field (or more appropriately a 'password' option on a regular field).
That said, I've seen Mark's PowerTools package which provides a lot of power, including a password field. However, I noticed a strange thing: selections don't disappear when typing.
Normally with a field, if you double-click it, the whole field becomes selected. If you then type, the whole field is replaced.
So far so good, but what if only the last few characters are selected?
Let's say that the password I'm typing is 'chewChoo', but the password I should type is 'chewChew'. the field contains '11111111'. If I select the last two characters and start typing, the characters that are selected in the field are deselected and added to the end of the password. Bummer.
How do I find out the index of selectedText? I can't search for '11' because *all* characters are '1'.
Also, how to implement the 'x' functionality when the field is on iOS?
I've been experimenting with iphoneCreateControl, but so far no luck.
Thanks,
-Ken
That said, I've seen Mark's PowerTools package which provides a lot of power, including a password field. However, I noticed a strange thing: selections don't disappear when typing.
Normally with a field, if you double-click it, the whole field becomes selected. If you then type, the whole field is replaced.
So far so good, but what if only the last few characters are selected?
Let's say that the password I'm typing is 'chewChoo', but the password I should type is 'chewChew'. the field contains '11111111'. If I select the last two characters and start typing, the characters that are selected in the field are deselected and added to the end of the password. Bummer.
How do I find out the index of selectedText? I can't search for '11' because *all* characters are '1'.
Also, how to implement the 'x' functionality when the field is on iOS?
I've been experimenting with iphoneCreateControl, but so far no luck.
Thanks,
-Ken