ArrowKey Handler in LiveCode 8?

RM richmondmathewson at gmail.com
Sat May 7 15:39:11 EDT 2016


Glad you filed that bug report, as arrowKeys not being sent to a card would
be a real B*mmer. Thanks.

Richmond.

On 7.05.2016 22:30, Mike Bonner wrote:
> If there isn't a focused object, arrowkey is supposed to be sent to the
> card. This isn't happening in 8.
>
> If you place an additional object (like a scrolling list field) onto the
> card and click it so that it has focus, and then hit the arrow keys, your
> object to move will behave as you expect.  arrowkey is sent to the focused
> object, then passed up to the card. Its this bug.
> http://quality.livecode.com/show_bug.cgi?id=17470
>
> On Sat, May 7, 2016 at 1:24 PM, RM <richmondmathewson at gmail.com> wrote:
>
>> I am beginning to wonder exactly HOW MUCH of the language has been changed,
>> and what justifies such change.
>>
>> Richmond.
>>
>> On 7.05.2016 21:56, Scott Rossi wrote:
>>
>>> If you want to recreate the behavior of previous versions of LC, you can
>>> do something like this:
>>>
>>> on arrowKey theKey
>>>      if the selObj is empty then pass arrowKey
>>>      put loc of the selObj into theLoc
>>>      put 1 into D
>>>      if the shiftkey is down then multiply D by 10
>>>      switch theKey
>>>          case "left"
>>>              subtract D from item 1 of theLoc
>>>              break
>>>          case "right"
>>>              add D to item 1 of theLoc
>>>              break
>>>          case "up"
>>>              subtract D from item 2 of theLoc
>>>              break
>>>          case "down"
>>>              add D to item 2 of theLoc
>>>      end switch
>>>      set loc of the selObj to theLoc
>>> end arrowKey
>>>
>>>
>>>
>>> Regards,
>>>
>>> Scott Rossi
>>> Creative Director
>>> Tactile Media, UX/UI Design
>>>
>>>
>>>
>>>
>>> On 7.05.2016 01:07, JOHN PATTEN wrote:
>>>>> Hi All,
>>>>>
>>>>> I was going to use the arrow keys to move an object, something like
>>>>> what Devin wrote up a while ago:
>>>>>
>>>>> on arrowKey pWhich
>>>>>      # determine some way to designate which object is to be nudged
>>>>>      put the long id of btn "test" into tSelObj # for example
>>>>>      switch pWhich
>>>>>        case "left"
>>>>>          put -1 into tXamount
>>>>>          put 0 into tYamount
>>>>>          break
>>>>>        case "up"
>>>>>          put 0 into tXamount
>>>>>          put -1 into tYamount
>>>>>          break
>>>>>        case "right"
>>>>>          put 1 into tXamount
>>>>>          put 0 into tYamount
>>>>>          break
>>>>>        case "down"
>>>>>          put 0 into tXamount
>>>>>          put 1 into tYamount
>>>>>          break
>>>>>      end switch
>>>>>      move tSelObj relative tXamount,tYamount
>>>>> end arrowKey
>>>>> Šand after a few tests in LiveCode 8, I can¹t get anything to budge
>>>>> with the arrowkeys? I opened the same stack in LiveCode 7.06 and it
>>>>> works fine. Something change or is this a bug in 8?
>>>>>
>>>>> Thank you!
>>>>>
>>> _______________________________________________
>>> use-livecode mailing list
>>> use-livecode at lists.runrev.com
>>> Please visit this url to subscribe, unsubscribe and manage your
>>> subscription preferences:
>>> http://lists.runrev.com/mailman/listinfo/use-livecode
>>>
>>
>> _______________________________________________
>> use-livecode mailing list
>> use-livecode at lists.runrev.com
>> Please visit this url to subscribe, unsubscribe and manage your
>> subscription preferences:
>> http://lists.runrev.com/mailman/listinfo/use-livecode
>>
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode





More information about the Use-livecode mailing list