Strange behaviour of arrowkey handler
Zarpa Iracunda
zarpairacunda at yahoo.de
Fri Jan 1 10:28:49 EST 2010
Hi all,
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
local tdata
local mykey
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"
end if
pass arrowKey
end arrowKey
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?
Many thanx!
Zarpa
More information about the use-livecode
mailing list