Arrow Key Message on a Mac

Deploying to Mac OS? Ask Mac OS specific questions here.

Moderators: heatherlaine, Klaus, FourthWorld, robinmiller, kevinmiller

Post Reply
dvermes
Posts: 12
Joined: Wed Nov 02, 2016 1:23 pm

Arrow Key Message on a Mac

Post by dvermes » Tue Dec 13, 2016 10:38 pm

My students are working on an app involving arrow keys causing movement of an object. We are using the arrowKey message. It works fine in Windows, but on a Mac, the arrow keys do not seem to trigger the arrowKey message when developing the app. (If it is deployed as a stand-alone app, then it works fine on a Mac). Is this a known issue with LiveCode on the Mac? We're using LiveCode 8.1.1 Community Edition.

jmburnod
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 2218
Joined: Sat Dec 22, 2007 5:35 pm
Location: Genève
Contact:

Re: Arrow Key Message on a Mac

Post by jmburnod » Wed Dec 14, 2016 10:38 am

Hi,
It sounds like you have to set the textarrows to false
Best regards
Jean-Marc

dvermes
Posts: 12
Joined: Wed Nov 02, 2016 1:23 pm

Re: Arrow Key Message on a Mac

Post by dvermes » Wed Dec 14, 2016 1:14 pm

I just tried setting the textarrows to false, but it didn't make any difference. What I am trying to do is this:

On a card, I have an image. In the script for the card, I have:

on arrowKey theKey
if theKey is "right" then move image "imgStar" relative 10,0
end arrowKey

When I put the program into run mode (Browse tool), in Windows, pressing the right arrow key moves the image right. On a Mac, pressing the right arrow key does nothing. I've put a breakpoint in the arrowKey handler and it is not triggered on the Mac, leading me to believe the arrowKey event is not running. However, if I deploy it as a standalone app, then it works fine regardless of if it's in Windows or on a Mac.

Klaus
Posts: 10280
Joined: Sat Apr 08, 2006 8:41 am
Location: Germany
Contact:

Re: Arrow Key Message on a Mac

Post by Klaus » Wed Dec 14, 2016 1:57 pm

Hi dvermes,

just made a test on macOS 10.12.2 with LC 8.1.2 RC3 and your script works as exspected in the IDE!
Sure there are not other (front-/backscripts) in the way in your IDE?


Best

Klaus

dvermes
Posts: 12
Joined: Wed Nov 02, 2016 1:23 pm

Re: Arrow Key Message on a Mac

Post by dvermes » Wed Dec 14, 2016 2:01 pm

Klaus,

I'm not sure. What sort of front/backscripts should I be looking for? My stack has a stack script and the card has a card script...

Thanks,

Doug

Klaus
Posts: 10280
Joined: Sat Apr 08, 2006 8:41 am
Location: Germany
Contact:

Re: Arrow Key Message on a Mac

Post by Klaus » Wed Dec 14, 2016 2:13 pm

Hi Doug,

if this also happens right after starting LC then there is probably no script in the way.
You could send me the stack if you like and I will take a look: klaus AT major-k.de


Best

Klaus

jmburnod
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 2218
Joined: Sat Dec 22, 2007 5:35 pm
Location: Genève
Contact:

Re: Arrow Key Message on a Mac

Post by jmburnod » Wed Dec 14, 2016 2:40 pm

Sorry, I was wrong, setting textarrows has no effect
I tested your script with LC community 8.0.0 and Indy 8.1.1 and it works.

dvermes
Posts: 12
Joined: Wed Nov 02, 2016 1:23 pm

Re: Arrow Key Message on a Mac

Post by dvermes » Wed Dec 14, 2016 2:50 pm

It looks like it's a LiveCode bug. I was running LiveCode 8.0.1 Community Edition on a Mac and the arrow keys did not work. I just downloaded LiveCode 8.1.2 RC3 Community Edition and it works fine on a Mac. Thanks to Klaus for helping me troubleshoot!

Post Reply

Return to “Mac OS”