I am getting a weird behaviour in one of my text fields and I don't know why. I have tried everything (or that's what I think) and I am going a bit insane.
So, I have this field, and I want that when the end user click on the field the first time, the original message (something like "type here") dissapears, so they do not have to delete it, and if they leave the field without typing anything, I want the original message to show back again. I also want to restrict the number of characters end users can type, and to prevent them from typing return.
So, this is what I have for the making the original message disappear. It does not work at all
Code: Select all
on mouseDown
if the text of me is "Conector" then
put empty into me
end if
end mouseDown
Code: Select all
on mouseLeave
if the text of me is empty then
put "Conector" into me
end if
end mouseLeave
Code: Select all
on rawKeyUp
put the number of chars of me into tChars
put 18 into tMaxChars
lock screen
if (tChars > tMaxChars ) then
answer "Has alcanzado el límite de espacio permitido. Revisa el texto y borra si quieres añadir algo más."
end if
if thekey is 65293 then
exit rawKeyUp
end if
unlock screen
pass rawKeyUp
end rawKeyUp
Any idea why this is not working?