Page 1 of 1

textchanged message

Posted: Mon Mar 26, 2012 1:42 pm
by scottatbc
Hi,

Did this not make the cut in 5.5? It's not in the dictionary and does not seem to work:

on textchanged mytext
put mytext into msg
end textchanged

has no apparent effect.

Thanks
Scott

Re: textchanged message

Posted: Mon Mar 26, 2012 3:11 pm
by sturgis
Not in my dict either, but works fine. However, there is no parameter involved so while your script should actually be working its putting an empty value.

Do this instead

on textchanged
-- if you put the script in the card you can use the target to get the name or id of the changed field
put the long id of the target && random(1000) into msg -- random so you can see it fire after each keypress.
end textchanged

EDIT: Check out inputTextChanged. Its IOS specific but functionally pretty much the same as textchanged.

Re: textchanged message

Posted: Mon Mar 26, 2012 3:20 pm
by dunbarx
Hi.

The release notes say nothing about an accompanying parameter. The message is simply sent whenever the text is changed.
You can always:

on textChanged
put me
put the value of the selectedLine
--or whatever
end textchanged

Re: textchanged message

Posted: Mon Mar 26, 2012 7:26 pm
by scottatbc
Ahh,

That's clear now - I was assuming a syntax like keydown.

Thanks to both of you!

Scott