Anything beyond the basics in using the LiveCode language. Share your handlers, functions and magic here.
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
-
dunbarx
- VIP Livecode Opensource Backer

- Posts: 10354
- Joined: Wed May 06, 2009 2:28 pm
Post
by dunbarx » Thu Apr 16, 2015 3:12 pm
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
-
richmond62
- Livecode Opensource Backer

- Posts: 10127
- Joined: Fri Feb 19, 2010 10:17 am
Post
by richmond62 » Thu Apr 16, 2015 5:25 pm
6.7.4
cardScript
on arrowKey KEE
put it into field "OOTPUT"
end arrowKey
NOTHING DOING.
-
jmburnod
- VIP Livecode Opensource Backer

- Posts: 2729
- Joined: Sat Dec 22, 2007 5:35 pm
-
Contact:
Post
by jmburnod » Thu Apr 16, 2015 6:00 pm
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
https://alternatic.ch
-
dunbarx
- VIP Livecode Opensource Backer

- Posts: 10354
- Joined: Wed May 06, 2009 2:28 pm
Post
by dunbarx » Thu Apr 16, 2015 6:15 pm
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
-
jacque
- VIP Livecode Opensource Backer

- Posts: 7393
- Joined: Sat Apr 08, 2006 8:31 pm
-
Contact:
Post
by jacque » Thu Apr 16, 2015 7:58 pm
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.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com
-
dunbarx
- VIP Livecode Opensource Backer

- Posts: 10354
- Joined: Wed May 06, 2009 2:28 pm
Post
by dunbarx » Thu Apr 16, 2015 8:50 pm
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
-
FourthWorld
- VIP Livecode Opensource Backer

- Posts: 10057
- Joined: Sat Apr 08, 2006 7:05 am
-
Contact:
Post
by FourthWorld » Thu Apr 16, 2015 8:51 pm
The Dictionary includes arrowkey among the relevant tokens even filtering for button objects.
-
jacque
- VIP Livecode Opensource Backer

- Posts: 7393
- Joined: Sat Apr 08, 2006 8:31 pm
-
Contact:
Post
by jacque » Thu Apr 16, 2015 9:22 pm
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.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com
-
abyteofdata
- Posts: 1
- Joined: Thu Apr 30, 2015 12:32 am
Post
by abyteofdata » Thu Apr 30, 2015 12:49 am
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]
-
Attachments
-
