Strange behaviour of arrowkey handler
zarpairacunda at yahoo.de
Fri Jan 1 09:28:49 CST 2010
happy new year to all of you!
My new year started with some confusion, which I am sure one of you can help me with.
I have a data grid group, which should do something when the user changes the selected line using an arrow key. I have put the following handler into the group script:
on arrowKey tkey
put tkey into mykey
answer "the key was " & mykey with "Ok!" titled "Arrow Key"
if ( ( mykey is "down" ) or ( mykey is "up" ) ) then
put the dgdata[the dgline of group "procdg"] of group "procdg" into tdata
answer tdata["id"] with "Ok!" titled "selected process"
It does throw the first answer, displaying the correct key value. Unfortunately, it does not evaluate the if clause. The second "answer" is never fired.
Can anybody point me into the direction of the mistake I made?
More information about the use-livecode