Page 1 of 1
Arrowkey works and does not work
Posted: Thu Apr 16, 2015 3:12 pm
by dunbarx
In an option menu, it is possible to open the menu with the mouse, and then use the arrow keys to navigate among the menuItems.
But no arrowKey message is sent. If you place this into the button script (and also in the card script if you so desire):
Code: Select all
on arrowkey tKey
put the selectedText of btn 1
pass arrow key
end arrowkey
Nothing is returned. The arrow keys work, but do not seem to be invoked with an arrowKey message, How can this be?
Craig Newman
Re: Arrowkey works and does not work
Posted: Thu Apr 16, 2015 5:25 pm
by richmond62
6.7.4
cardScript
on arrowKey KEE
put it into field "OOTPUT"
end arrowKey
NOTHING DOING.
Re: Arrowkey works and does not work
Posted: Thu Apr 16, 2015 6:00 pm
by jmburnod
Hi Craig,
Thanks for this. I discover this feature that could be useful for accessibility.
I tested in IDE 6.7.0 (the more stable version for the needs of my last app)
I have the same results. It seems that if a menu is open the arrowkey message is catched and can not continue along messages path.
I tried :
Code: Select all
on arrowkey pKey -- with option menu open doesn't works
beep --no beep
put the menuhistory of btn 1 into tMH
put the selectedText of btn 1 into tST
put tMH & cr & tST
end arrowkey
on returnkey -- with option menu open doesn't works
beep --no beep
put the menuhistory of btn 1 into tMH
put the selectedText of btn 1 into tST
put tMH & cr & tST
end returnkey
Jean-Marc
Re: Arrowkey works and does not work
Posted: Thu Apr 16, 2015 6:15 pm
by dunbarx
OK.
Seems like the whole family of popups and pulldowns exhibit similar non-behavior. I will run it by QCC if nobody from LC chimes in soon with an explanation, apology or excuse.
Craig
Re: Arrowkey works and does not work
Posted: Thu Apr 16, 2015 7:58 pm
by jacque
ArrowKey isn't sent to buttons, it's sent to cards and fields. This is a design decision, since most buttons don't have field components, so a QCC report should probably be a feature request rather than a bug.
Re: Arrowkey works and does not work
Posted: Thu Apr 16, 2015 8:50 pm
by dunbarx
Jacque.
Figures. It was just that since the arrowKey "message" acted on a button, I thought it ought to be sent to that button. So the arrowKey message knows what the "target" is, but bypasses that control?
But if you already knew that, then I will not make a QCC request.
Craig
Re: Arrowkey works and does not work
Posted: Thu Apr 16, 2015 8:51 pm
by FourthWorld
The Dictionary includes arrowkey among the relevant tokens even filtering for button objects.
Re: Arrowkey works and does not work
Posted: Thu Apr 16, 2015 9:22 pm
by jacque
FourthWorld wrote:The Dictionary includes arrowkey among the relevant tokens even filtering for button objects.
In that case, either the engine or the dictionary has a bug.
Re: Arrowkey works and does not work
Posted: Thu Apr 30, 2015 12:49 am
by abyteofdata
In 7.0.4, the arrowKey message does not appear to be sent to a card. Setting a breakpoint in the card script, the handler never gets the message. Here is a snippet of code from the card script that worked perfectly in 6.7.1 thru 7.0.3 to move a graphic oval around a card:
[attachment=0]Screen Shot 2015-04-29 at 6.46.42 PM.PNG[/attachment]