Re: ArrowKey Handler in LiveCode 8?
A few words in defense of the LC dev team: We have the first stable release, a dot-dot-release ... And I couldn't even find in 5 minutes an arrowkey on one of the available mobiles around! Not sent from an iPhone. -- View this message in context: http://runtime-revolution.278305.n4.nabble.com/ArrowKey-Handler-in-LiveCode-8-tp4704403p4704450.html Sent from the Revolution - User mailing list archive at Nabble.com. ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: ArrowKey Handler in LiveCode 8?
I assume (???) a lot of these "oversights" are the result of the 'fact' (?) that the Livecode people have gone back to square one and virtually recreated Livecode /ad novum/ rather than adding incrementally on top of Livecode 7. I don't know whether this is true. But it seems the 'kindest' explanation of why a fair few of these things keep cropping up. R. On 7.05.2016 22:42, Scott Rossi wrote: The arrowKey code has nothing to do with a change in language -- the lack of arrowKey functionality in the IDE is just an oversight on the part of LiveCode Ltd. (at least, I hope it is). Regards, Scott Rossi Creative Director Tactile Media, UX/UI Design On 5/7/16, 12:24 PM, "use-livecode on behalf of RM" <use-livecode-boun...@lists.runrev.com on behalf of richmondmathew...@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@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@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: ArrowKey Handler in LiveCode 8?
The arrowKey code has nothing to do with a change in language -- the lack of arrowKey functionality in the IDE is just an oversight on the part of LiveCode Ltd. (at least, I hope it is). Regards, Scott Rossi Creative Director Tactile Media, UX/UI Design On 5/7/16, 12:24 PM, "use-livecode on behalf of RM" <use-livecode-boun...@lists.runrev.com on behalf of richmondmathew...@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@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: ArrowKey Handler in LiveCode 8?
I didn't file it, just went looking for one and there it was. On Sat, May 7, 2016 at 1:39 PM, RM <richmondmathew...@gmail.com> wrote: > 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 <richmondmathew...@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@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@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@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@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@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: ArrowKey Handler in LiveCode 8?
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 <richmondmathew...@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@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@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@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@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: ArrowKey Handler in LiveCode 8?
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 <richmondmathew...@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@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@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@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: ArrowKey Handler in LiveCode 8?
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@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@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: ArrowKey Handler in LiveCode 8?
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@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: ArrowKey Handler in LiveCode 8?
NBG: Stack here: http://forums.livecode.com/viewtopic.php?f=6=27225 on arrowKey AWK switch AWK case "left" put item 1 of the loc of img "eight" into IT1 put item 2 of the loc of img "eight" into IT2 put (IT1 - 10) into IT1 move img "eight" to IT1, IT2 break case "right" put item 1 of the loc of img "eight" into IT1 put item 2 of the loc of img "eight" into IT2 put (IT1 + 10) into IT1 move img "eight" to IT1, IT2 break case "up" put item 1 of the loc of img "eight" into IT1 put item 2 of the loc of img "eight" into IT2 put (IT2 - 10) into IT1 move img "eight" to IT1, IT2 break case "down" put item 1 of the loc of img "eight" into IT1 put item 2 of the loc of img "eight" into IT2 put (IT2 + 10) into IT1 move img "eight" to IT1, IT2 break end switch end arrowKey Richmond. 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@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@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
ArrowKey Handler in LiveCode 8?
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@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: arrowKey 'up' and 'down'
Heres my take on it. Moved most of the code to the graphic. Game loops work so much better for this type of thing because you avoid the "arrowkey" repeat problem entirely. All it does is loop, look at what keys are down, and acts appropriately. Changed the move distance to 5, and increment a counter to pick the next animation frame. Added a start button to start and stop the loop. Great penguin graphics, love the affect! Heres a link to the modified stack. On Sun, Apr 24, 2016 at 1:43 AM, RM <richmondmathew...@gmail.com> wrote: > Of course my next problem is how, when a punter presses the arrowKey to > have it "fire" only once: i.e. then chummy keeps his/her finger on the key > it doesn't continue sending arrowKey signals after the first one. > > Richmond. > > > ___ > use-livecode mailing list > use-livecode@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@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: arrowKey 'up' and 'down'
OOps, heres the link. https://dl.dropboxusercontent.com/u/11957935/ANIMATION%209.5.livecode On Sun, Apr 24, 2016 at 8:41 AM, Mike Bonner <bonnm...@gmail.com> wrote: > Heres my take on it. Moved most of the code to the graphic. Game loops > work so much better for this type of thing because you avoid the "arrowkey" > repeat problem entirely. > > All it does is loop, look at what keys are down, and acts appropriately. > Changed the move distance to 5, and increment a counter to pick the next > animation frame. > > Added a start button to start and stop the loop. Great penguin graphics, > love the affect! > > Heres a link to the modified stack. > > > On Sun, Apr 24, 2016 at 1:43 AM, RM <richmondmathew...@gmail.com> wrote: > >> Of course my next problem is how, when a punter presses the arrowKey to >> have it "fire" only once: i.e. then chummy keeps his/her finger on the key >> it doesn't continue sending arrowKey signals after the first one. >> >> Richmond. >> >> >> ___ >> use-livecode mailing list >> use-livecode@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@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: arrowKey 'up' and 'down'
Of course my next problem is how, when a punter presses the arrowKey to have it "fire" only once: i.e. then chummy keeps his/her finger on the key it doesn't continue sending arrowKey signals after the first one. Richmond. ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: arrowKey 'up' and 'down'
"pass arrowKey" sorted things out rather well: thanks a lot! https://www.dropbox.com/s/5ym1zrzebsfrbyy/ANIMATION%209.5.livecode.zip?dl=0 Richmond. On 24.04.2016 08:44, Peter Bogdanoff wrote: Also, you might include “pass arrowKey” at the end of the script Peter On Apr 23, 2016, at 12:49 PM, RM <richmondmathew...@gmail.com> wrote: Thanks for those recommendations; will try them tomorrow as it is almost my bedtime over here in Bulgaria. Richmond. On 23.04.2016 22:31, J. Landman Gay wrote: On 4/23/2016 1:00 PM, RM wrote: (pseudocode) on arrowKey ArKey if ArKey = "right" then move object in some way this line defines send signal to object to initiate animation script within object end if end arrowKey when I hit my right arrow key ONCE the object moves and then animates ONCE. HOWEVER, if I keep my finger on the right arrow key the movement repeats, but the multiple instances of the "send signal to object" scriptLine get "saved up" and fire at the point I take my finger off the arrow key; The signals are added to a queue but don't get a chance to fire, presumably because the arrowkey message is happening repeatedly. Queued messages need some idle time before they'll execute. This might work better if you add "without waiting" to the move command, allowing the handler to continue immediately, and then call the animation handler directly without using "send". How can I tell when an end-user ('punter') has stopped pressing an arrowKey? Try rawKeyUp, but you may not need that if you change the move command. ___ use-livecode mailing list use-livecode@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@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@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: arrowKey 'up' and 'down'
Also, you might include “pass arrowKey” at the end of the script Peter On Apr 23, 2016, at 12:49 PM, RM <richmondmathew...@gmail.com> wrote: > Thanks for those recommendations; will try them tomorrow as it is almost my > bedtime > over here in Bulgaria. > > Richmond. > > On 23.04.2016 22:31, J. Landman Gay wrote: >> On 4/23/2016 1:00 PM, RM wrote: >>> (pseudocode) >>> >>> on arrowKey ArKey >>> if ArKey = "right" then >>>move object in some way this line defines >>>send signal to object to initiate animation script within object >>> end if >>> end arrowKey >>> >>> when I hit my right arrow key ONCE the object moves and then animates ONCE. >>> >>> HOWEVER, if I keep my finger on the right arrow key the movement >>> repeats, but the multiple >>> instances of the "send signal to object" scriptLine get "saved up" and >>> fire at the point I take my finger >>> off the arrow key; >> >> The signals are added to a queue but don't get a chance to fire, presumably >> because the arrowkey message is happening repeatedly. Queued messages need >> some idle time before they'll execute. >> >> This might work better if you add "without waiting" to the move command, >> allowing the handler to continue immediately, and then call the animation >> handler directly without using "send". >> >>> How can I tell when an end-user ('punter') has stopped pressing an arrowKey? >> >> Try rawKeyUp, but you may not need that if you change the move command. >> > > > ___ > use-livecode mailing list > use-livecode@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@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: arrowKey 'up' and 'down'
Thanks for those recommendations; will try them tomorrow as it is almost my bedtime over here in Bulgaria. Richmond. On 23.04.2016 22:31, J. Landman Gay wrote: On 4/23/2016 1:00 PM, RM wrote: (pseudocode) on arrowKey ArKey if ArKey = "right" then move object in some way this line defines send signal to object to initiate animation script within object end if end arrowKey when I hit my right arrow key ONCE the object moves and then animates ONCE. HOWEVER, if I keep my finger on the right arrow key the movement repeats, but the multiple instances of the "send signal to object" scriptLine get "saved up" and fire at the point I take my finger off the arrow key; The signals are added to a queue but don't get a chance to fire, presumably because the arrowkey message is happening repeatedly. Queued messages need some idle time before they'll execute. This might work better if you add "without waiting" to the move command, allowing the handler to continue immediately, and then call the animation handler directly without using "send". How can I tell when an end-user ('punter') has stopped pressing an arrowKey? Try rawKeyUp, but you may not need that if you change the move command. ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: arrowKey 'up' and 'down'
On 4/23/2016 1:00 PM, RM wrote: (pseudocode) on arrowKey ArKey if ArKey = "right" then move object in some way this line defines send signal to object to initiate animation script within object end if end arrowKey when I hit my right arrow key ONCE the object moves and then animates ONCE. HOWEVER, if I keep my finger on the right arrow key the movement repeats, but the multiple instances of the "send signal to object" scriptLine get "saved up" and fire at the point I take my finger off the arrow key; The signals are added to a queue but don't get a chance to fire, presumably because the arrowkey message is happening repeatedly. Queued messages need some idle time before they'll execute. This might work better if you add "without waiting" to the move command, allowing the handler to continue immediately, and then call the animation handler directly without using "send". How can I tell when an end-user ('punter') has stopped pressing an arrowKey? Try rawKeyUp, but you may not need that if you change the move command. -- Jacqueline Landman Gay | jac...@hyperactivesw.com HyperActive Software | http://www.hyperactivesw.com ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
arrowKey 'up' and 'down'
OK, OK, I've been messing around with moving daft images around using the arrowKeys on my keyboard - nothing new there. However, I have been moving graphic objects around that have been flipping their way through a series of backGroundPattern images as they have been moved, and this has created a problem: if I have this sort of code in my cardScript: (pseudocode) on arrowKey ArKey if ArKey = "right" then move object in some way this line defines send signal to object to initiate animation script within object end if end arrowKey when I hit my right arrow key ONCE the object moves and then animates ONCE. HOWEVER, if I keep my finger on the right arrow key the movement repeats, but the multiple instances of the "send signal to object" scriptLine get "saved up" and fire at the point I take my finger off the arrow key; both looking daft and, potentially, interfering with what I should see when, say, I press the left arrow key. Obviously "this will not do" . . . . So? I tried a keyUp script in my cardScript, but that failed to fire. So? How can I tell when an end-user ('punter') has stopped pressing an arrowKey? There is no 'arrowKeyUp' or 'arrowKeyDown' as far as I know. Richmond. ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: list field not getting arrowkey msg
Mike Bonner wrote Very weird. I can't get arrow keys to work with any list field if the selection is empty. But hey, all that matters is that it works. Hi Mike, could you try this on a list field with a hilited line and either a second field that can get focus or no other field/control that can get focus and test if the arrowkeys work? put this code into the script of the list field -- on focusIn -- when tabbing into field activateLine end focusIn -- in case of tab but no other field/control gets focus, i.e. field is only focusable object beside card on focusOut send checkWhoIsFocused to me in 10 milliseconds end focusOut on checkWhoIsFocused -- restore selection after tabbing while in only focusable object if the focusedObject = the long id of me then activateLine end if end checkWhoIsFocused on activateLine put the hilitedLine of me into tHilitedLine if tHilitedLine then select line tHIlitedLine of me end activateLine -- Kind regards Bernd -- View this message in context: http://runtime-revolution.278305.n4.nabble.com/list-field-not-getting-arrowkey-msg-tp4694070p4694196.html Sent from the Revolution - User mailing list archive at Nabble.com. ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: list field not getting arrowkey msg
Yep, it works well, whether its a single field or not. The only instance where it doesn't work correctly is if click to toggle is on (so that there are no hilitedlines) Focus is accepted, but no selection is made. Of course with click to toggle on, using arrow keys to select multiple lines would take custom coding anyway. Your code is similar to mine, the only addition I made was to select char 1 to 0 when no hilitedline is available. On Wed, Jul 22, 2015 at 4:10 AM, BNig bernd.niggem...@uni-wh.de wrote: Mike Bonner wrote Very weird. I can't get arrow keys to work with any list field if the selection is empty. But hey, all that matters is that it works. Hi Mike, could you try this on a list field with a hilited line and either a second field that can get focus or no other field/control that can get focus and test if the arrowkeys work? put this code into the script of the list field -- on focusIn -- when tabbing into field activateLine end focusIn -- in case of tab but no other field/control gets focus, i.e. field is only focusable object beside card on focusOut send checkWhoIsFocused to me in 10 milliseconds end focusOut on checkWhoIsFocused -- restore selection after tabbing while in only focusable object if the focusedObject = the long id of me then activateLine end if end checkWhoIsFocused on activateLine put the hilitedLine of me into tHilitedLine if tHilitedLine then select line tHIlitedLine of me end activateLine -- Kind regards Bernd -- View this message in context: http://runtime-revolution.278305.n4.nabble.com/list-field-not-getting-arrowkey-msg-tp4694070p4694196.html Sent from the Revolution - User mailing list archive at Nabble.com. ___ use-livecode mailing list use-livecode@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@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: list field not getting arrowkey msg
Mike, thanks for testing. this thread made me aware of the problem and I think I will incorporate the code into my list field. Kind regards Bernd Mike Bonner wrote Yep, it works well, whether its a single field or not. The only instance where it doesn't work correctly is if click to toggle is on (so that there are no hilitedlines) Focus is accepted, but no selection is made. Of course with click to toggle on, using arrow keys to select multiple lines would take custom coding anyway. Your code is similar to mine, the only addition I made was to select char 1 to 0 when no hilitedline is available. On Wed, Jul 22, 2015 at 4:10 AM, BNig lt; bernd.niggemann@ gt; wrote: Mike Bonner wrote Very weird. I can't get arrow keys to work with any list field if the selection is empty. But hey, all that matters is that it works. Hi Mike, could you try this on a list field with a hilited line and either a second field that can get focus or no other field/control that can get focus and test if the arrowkeys work? put this code into the script of the list field -- on focusIn -- when tabbing into field activateLine end focusIn -- in case of tab but no other field/control gets focus, i.e. field is only focusable object beside card on focusOut send checkWhoIsFocused to me in 10 milliseconds end focusOut on checkWhoIsFocused -- restore selection after tabbing while in only focusable object if the focusedObject = the long id of me then activateLine end if end checkWhoIsFocused on activateLine put the hilitedLine of me into tHilitedLine if tHilitedLine then select line tHIlitedLine of me end activateLine -- Kind regards Bernd -- View this message in context: http://runtime-revolution.278305.n4.nabble.com/list-field-not-getting-arrowkey-msg-tp4694070p4694201.html Sent from the Revolution - User mailing list archive at Nabble.com. ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: list field not getting arrowkey msg
Foolish question, but have you tried creating a new field from scratch, pasting the script, and seeing if that works? I've had to do that a couple for times when some exotic and non-displayed property or another got set. -- Dr. Richard E. Hawkins, Esq. (702) 508-8462 ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: list field not getting arrowkey msg
That's my next step. -- Peter Peter M. Brigham pmb...@gmail.com http://home.comcast.net/~pmbrig On Jul 21, 2015, at 11:26 AM, Dr. Hawkins wrote: Foolish question, but have you tried creating a new field from scratch, pasting the script, and seeing if that works? I've had to do that a couple for times when some exotic and non-displayed property or another got set. -- Dr. Richard E. Hawkins, Esq. (702) 508-8462 ___ use-livecode mailing list use-livecode@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@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: list field not getting arrowkey msg
When I add select line lineNbr of me or select before line lineNbr of me right after set the hilitedline of me to lineNbr in my mouseup handler, it makes no difference. Arrowkeys up and down still do nothing. Not sure what you mean when you say that an insertion point of some type is necessary, since this is a field with listbehavior = true and it never has an insertion point, just a hilitedline. And, I repeat, I have an equivalent list field in another stack with the same properties that works fine with the arrowkeys to change the hilitedline with no select line x or other work-around needed, ie, it works the way list fields are supposed to work: just click on the field to hilite a line, then arrowkey up or down to change the hilitedline. Still a mystery. I may need to delete the field and replace it with a copy of my working field from the other stack, then alter the script to work in the problematic stack. -- Peter Peter M. Brigham pmb...@gmail.com http://home.comcast.net/~pmbrig On Jul 21, 2015, at 10:56 AM, Mike Bonner wrote: Having a line hilited isn't enough. It seems you MUST have an insertion point of some type. Either select the line lineNbr, or if there is nothing selected, set the selectedchunk to char 1 to 0 of me On Tue, Jul 21, 2015 at 8:38 AM, Peter M. Brigham pmb...@gmail.com wrote: On Jul 21, 2015, at 2:07 AM, Kay C Lan wrote: On Mon, Jul 20, 2015 at 11:17 AM, Peter M. Brigham pmb...@gmail.com wrote: Having found that the focus is on the card, for reasons best known to the engine (certainly not to me), What does the Message Watcher say? If on clicking on a line in the fld fires a salvo of messages, somewhere - frontscript, backscript, card or stack script a handler is being fired that sends the focus elsewhere; apparently the card. Do a global script search for 'go', 'send', 'select' and 'focus'. There are probably other ways to remove the focus but those come readily to mind. I don't see anything in my mouseup script that would change the focus: on mouseup tBtn select empty -- putting focus on me here doesn't fix the problem put getGridCell() into g -- doesn't go to or select anything put item 1 of g into lineNbr put item 2 of g into colNbr if lineNbr = empty then exit mouseup else set the hilitedline of me to lineNbr -- this should put the focus in the field end if put line lineNbr of me into listEntry put getItem(listEntry, 1, tab) into noteTitle -- doesn't go to or select anything displayNote noteTitle -- fetches a customprop and puts it into the display field -- but this shouldn't move the focus -- putting focus on me here doesn't fix the problem if tBtn 3 then exit mouseup put popChoose(rename,delete) into u switch u case rename renameNote noteTitle break case delete answer Are you sure you want to delete this note? This is not undo-able! with OK or whoops! \ as sheet if it is not OK then exit to top deleteNote lineNbr, noteTitle break end switch end mouseup I'll take a look at the messagewatcher when I get a chance. -- Peter Peter M. Brigham pmb...@gmail.com http://home.comcast.net/~pmbrig ___ use-livecode mailing list use-livecode@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@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@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: list field not getting arrowkey msg
What I mean is.. When I use tab to change focus between fields, the arrow keys do nothing in the field I tabbed into. When I click and select a line in the field, then the arrow keys work. In the former, the focusedobject correctly shows the field in question, but has no selectedchunk. In the latter, the focus is correct, but the seletedchunk reflects the line clicked. Remove the select empty from the top of your handler and it should work. Just tried it here. On Tue, Jul 21, 2015 at 10:26 AM, Peter M. Brigham pmb...@gmail.com wrote: That's my next step. -- Peter Peter M. Brigham pmb...@gmail.com http://home.comcast.net/~pmbrig On Jul 21, 2015, at 11:26 AM, Dr. Hawkins wrote: Foolish question, but have you tried creating a new field from scratch, pasting the script, and seeing if that works? I've had to do that a couple for times when some exotic and non-displayed property or another got set. -- Dr. Richard E. Hawkins, Esq. (702) 508-8462 ___ use-livecode mailing list use-livecode@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@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@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: list field not getting arrowkey msg
I ran into this and just worked around it. Bob S On Jul 19, 2015, at 06:07 , Peter M. Brigham pmb...@gmail.com wrote: I have a list field in one stack that isn't behaving properly. List fields are supposed to allow up and down arrowkeys to move the hilited line. From the dictionary: If a field's listBehavior property is set to true, and the user clicks a line, the entire line is highlighted. The Up and Down arrow keys move the selection up or down. I have a similar field in another stack that works exactly as expected. The two fields both have their listbehavior set to true -- in fact, AFAICS all their basic properties are the same. I have no arrowkey handlers in any scripts in the misbehaving stack. Ideas? -- Peter Peter M. Brigham pmb...@gmail.com http://home.comcast.net/~pmbrig ___ use-livecode mailing list use-livecode@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@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: list field not getting arrowkey msg
Having a line hilited isn't enough. It seems you MUST have an insertion point of some type. Either select the line lineNbr, or if there is nothing selected, set the selectedchunk to char 1 to 0 of me On Tue, Jul 21, 2015 at 8:38 AM, Peter M. Brigham pmb...@gmail.com wrote: On Jul 21, 2015, at 2:07 AM, Kay C Lan wrote: On Mon, Jul 20, 2015 at 11:17 AM, Peter M. Brigham pmb...@gmail.com wrote: Having found that the focus is on the card, for reasons best known to the engine (certainly not to me), What does the Message Watcher say? If on clicking on a line in the fld fires a salvo of messages, somewhere - frontscript, backscript, card or stack script a handler is being fired that sends the focus elsewhere; apparently the card. Do a global script search for 'go', 'send', 'select' and 'focus'. There are probably other ways to remove the focus but those come readily to mind. I don't see anything in my mouseup script that would change the focus: on mouseup tBtn select empty -- putting focus on me here doesn't fix the problem put getGridCell() into g -- doesn't go to or select anything put item 1 of g into lineNbr put item 2 of g into colNbr if lineNbr = empty then exit mouseup else set the hilitedline of me to lineNbr -- this should put the focus in the field end if put line lineNbr of me into listEntry put getItem(listEntry, 1, tab) into noteTitle -- doesn't go to or select anything displayNote noteTitle -- fetches a customprop and puts it into the display field -- but this shouldn't move the focus -- putting focus on me here doesn't fix the problem if tBtn 3 then exit mouseup put popChoose(rename,delete) into u switch u case rename renameNote noteTitle break case delete answer Are you sure you want to delete this note? This is not undo-able! with OK or whoops! \ as sheet if it is not OK then exit to top deleteNote lineNbr, noteTitle break end switch end mouseup I'll take a look at the messagewatcher when I get a chance. -- Peter Peter M. Brigham pmb...@gmail.com http://home.comcast.net/~pmbrig ___ use-livecode mailing list use-livecode@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@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: list field not getting arrowkey msg
On July 21, 2015 9:38:11 AM CDT, Peter M. Brigham pmb...@gmail.com wrote: I don't see anything in my mouseup script that would change the focus: on mouseup tBtn select empty -- putting focus on me here doesn't fix the problem As a test, remove the select empty line and see what happens. It might at least narrow down the problem. -- Jacqueline Landman Gay | jac...@hyperactivesw.com HyperActive Software | http://www.hyperactivesw.com ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: list field not getting arrowkey msg
Hey, in fact, the easiest test I can find to prove this is.. put a mouseup handler in a field with ONLY select empty. Then try it. Boom, no arrow keys. On Tue, Jul 21, 2015 at 10:44 AM, Mike Bonner bonnm...@gmail.com wrote: What I mean is.. When I use tab to change focus between fields, the arrow keys do nothing in the field I tabbed into. When I click and select a line in the field, then the arrow keys work. In the former, the focusedobject correctly shows the field in question, but has no selectedchunk. In the latter, the focus is correct, but the seletedchunk reflects the line clicked. Remove the select empty from the top of your handler and it should work. Just tried it here. On Tue, Jul 21, 2015 at 10:26 AM, Peter M. Brigham pmb...@gmail.com wrote: That's my next step. -- Peter Peter M. Brigham pmb...@gmail.com http://home.comcast.net/~pmbrig On Jul 21, 2015, at 11:26 AM, Dr. Hawkins wrote: Foolish question, but have you tried creating a new field from scratch, pasting the script, and seeing if that works? I've had to do that a couple for times when some exotic and non-displayed property or another got set. -- Dr. Richard E. Hawkins, Esq. (702) 508-8462 ___ use-livecode mailing list use-livecode@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@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@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: list field not getting arrowkey msg
Mike Bonner wrote: What I mean is.. When I use tab to change focus between fields, the arrow keys do nothing in the field I tabbed into. When I click and select a line in the field, then the arrow keys work. In the former, the focusedobject correctly shows the field in question, but has no selectedchunk. In the latter, the focus is correct, but the seletedchunk reflects the line clicked. I've seen this myself. I thought there was a bug report against that, but I couldn't find it this morning. Anyone know if that's been submitted? If not, would you like to submit that, Mike? -- Richard Gaskin Fourth World Systems Software Design and Development for the Desktop, Mobile, and the Web ambassa...@fourthworld.comhttp://www.FourthWorld.com ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: list field not getting arrowkey msg
Heres the bug you reported Richard: http://quality.runrev.com/show_bug.cgi?id=13689 Going to add a note to it. On Tue, Jul 21, 2015 at 10:55 AM, Mike Bonner bonnm...@gmail.com wrote: Depends, I went back to 6.6.2. Don't know if it goes farther back than 5.5, but.. is this expected behavior or no? I'll see if I can locate the report real quick. On Tue, Jul 21, 2015 at 10:50 AM, Richard Gaskin ambassa...@fourthworld.com wrote: Mike Bonner wrote: What I mean is.. When I use tab to change focus between fields, the arrow keys do nothing in the field I tabbed into. When I click and select a line in the field, then the arrow keys work. In the former, the focusedobject correctly shows the field in question, but has no selectedchunk. In the latter, the focus is correct, but the seletedchunk reflects the line clicked. I've seen this myself. I thought there was a bug report against that, but I couldn't find it this morning. Anyone know if that's been submitted? If not, would you like to submit that, Mike? -- Richard Gaskin Fourth World Systems Software Design and Development for the Desktop, Mobile, and the Web ambassa...@fourthworld.comhttp://www.FourthWorld.com ___ use-livecode mailing list use-livecode@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@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: list field not getting arrowkey msg
Depends, I went back to 6.6.2. Don't know if it goes farther back than 5.5, but.. is this expected behavior or no? I'll see if I can locate the report real quick. On Tue, Jul 21, 2015 at 10:50 AM, Richard Gaskin ambassa...@fourthworld.com wrote: Mike Bonner wrote: What I mean is.. When I use tab to change focus between fields, the arrow keys do nothing in the field I tabbed into. When I click and select a line in the field, then the arrow keys work. In the former, the focusedobject correctly shows the field in question, but has no selectedchunk. In the latter, the focus is correct, but the seletedchunk reflects the line clicked. I've seen this myself. I thought there was a bug report against that, but I couldn't find it this morning. Anyone know if that's been submitted? If not, would you like to submit that, Mike? -- Richard Gaskin Fourth World Systems Software Design and Development for the Desktop, Mobile, and the Web ambassa...@fourthworld.comhttp://www.FourthWorld.com ___ use-livecode mailing list use-livecode@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@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: list field not getting arrowkey msg
On Jul 21, 2015, at 12:44 PM, Mike Bonner wrote: What I mean is.. When I use tab to change focus between fields, the arrow keys do nothing in the field I tabbed into. When I click and select a line in the field, then the arrow keys work. In the former, the focusedobject correctly shows the field in question, but has no selectedchunk. In the latter, the focus is correct, but the seletedchunk reflects the line clicked. Remove the select empty from the top of your handler and it should work. Just tried it here. I tried that, but it didn't solve the problem. Creating a new field (with the same script as the old one) did. On Tue, Jul 21, 2015 at 10:26 AM, Peter M. Brigham pmb...@gmail.com wrote: That's my next step. -- Peter Peter M. Brigham pmb...@gmail.com http://home.comcast.net/~pmbrig On Jul 21, 2015, at 11:26 AM, Dr. Hawkins wrote: Foolish question, but have you tried creating a new field from scratch, pasting the script, and seeing if that works? I've had to do that a couple for times when some exotic and non-displayed property or another got set. -- Peter Peter M. Brigham pmb...@gmail.com http://home.comcast.net/~pmbrig ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: list field not getting arrowkey msg
So creating a new list field (with the same script as the old one) and deleting the old list field did the trick. I don't know what field property setting that I was unaware of caused this problem. AFAIK, there should be no field property that blocks a list field from getting arrowkey messages, but something was doing it…. Anyway, problem solved. -- Peter Peter M. Brigham pmb...@gmail.com http://home.comcast.net/~pmbrig On Jul 21, 2015, at 11:26 AM, Dr. Hawkins wrote: Foolish question, but have you tried creating a new field from scratch, pasting the script, and seeing if that works? I've had to do that a couple for times when some exotic and non-displayed property or another got set. -- Dr. Richard E. Hawkins, Esq. (702) 508-8462 ___ use-livecode mailing list use-livecode@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@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: list field not getting arrowkey msg
Very weird. I can't get arrow keys to work with any list field if the selection is empty. But hey, all that matters is that it works. On Tue, Jul 21, 2015 at 1:46 PM, Peter M. Brigham pmb...@gmail.com wrote: On Jul 21, 2015, at 12:44 PM, Mike Bonner wrote: What I mean is.. When I use tab to change focus between fields, the arrow keys do nothing in the field I tabbed into. When I click and select a line in the field, then the arrow keys work. In the former, the focusedobject correctly shows the field in question, but has no selectedchunk. In the latter, the focus is correct, but the seletedchunk reflects the line clicked. Remove the select empty from the top of your handler and it should work. Just tried it here. I tried that, but it didn't solve the problem. Creating a new field (with the same script as the old one) did. On Tue, Jul 21, 2015 at 10:26 AM, Peter M. Brigham pmb...@gmail.com wrote: That's my next step. -- Peter Peter M. Brigham pmb...@gmail.com http://home.comcast.net/~pmbrig On Jul 21, 2015, at 11:26 AM, Dr. Hawkins wrote: Foolish question, but have you tried creating a new field from scratch, pasting the script, and seeing if that works? I've had to do that a couple for times when some exotic and non-displayed property or another got set. -- Peter Peter M. Brigham pmb...@gmail.com http://home.comcast.net/~pmbrig ___ use-livecode mailing list use-livecode@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@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: list field not getting arrowkey msg
On Mon, Jul 20, 2015 at 11:17 AM, Peter M. Brigham pmb...@gmail.com wrote: Having found that the focus is on the card, for reasons best known to the engine (certainly not to me), What does the Message Watcher say? If on clicking on a line in the fld fires a salvo of messages, somewhere - frontscript, backscript, card or stack script a handler is being fired that sends the focus elsewhere; apparently the card. Do a global script search for 'go', 'send', 'select' and 'focus'. There are probably other ways to remove the focus but those come readily to mind. ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: list field not getting arrowkey msg
I *have* a mouseup handler in the field, and it works fine. -- Peter Peter M. Brigham pmb...@gmail.com http://home.comcast.net/~pmbrig On Jul 20, 2015, at 3:14 PM, J. Landman Gay wrote: But did you try a mouseUp handler? I'm curious if the field is recognized in any way. On 7/20/2015 1:47 PM, Peter Brigham wrote: Unfortunately, I still get nothing with the hilitedlines of me in the field script. The arrowkey message is not going to the field. Here's the arrowkey handler in the card script. This works fine but I don't know why it should be necessary. on arrowkey what put hilitedline of fld notesList into lineNbr put the number of lines of fld notesList into totNbr switch what case left case right pass arrowkey break case up if lineNbr = 1 then put totNbr into nextLineNbr else put lineNbr - 1 into nextLineNbr end if break case down if lineNbr = nextLineNbr then put 1 into nextLineNbr else put lineNbr + 1 into nextLineNbr end if break end switch set the hilitedline of fld notesList to nextLineNbr put line nextLineNbr of fld notesList into listEntry put getItem(listEntry, 1, tab) into noteTitle displayNote noteTitle pass arrowkey end arrowkey -- Peter Peter M. Brigham pmb...@gmail.com http://home.comcast.net/~pmbrig On Mon, Jul 20, 2015 at 2:14 PM, J. Landman Gay jac...@hyperactivesw.com wrote: On 7/19/2015 10:17 PM, Peter M. Brigham wrote: There is a line selected. If I put the following into the field script: on arrowkey put the hilitedlines end arrowkey then click in the field to select a line, then hit up- or down-arrowkey, nothing happens. The field is apparently not getting the arrowkey message. It's acting as though the traversalon of the field is false, but it's not. What do you get if you put this into the field script: on mouseUp put the hilitedlines of me end mouseUp BTW, I think your arrowkey test needs of the target. Hilitedlines without an object reference is probably always empty. ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: list field not getting arrowkey msg
On Jul 21, 2015, at 2:07 AM, Kay C Lan wrote: On Mon, Jul 20, 2015 at 11:17 AM, Peter M. Brigham pmb...@gmail.com wrote: Having found that the focus is on the card, for reasons best known to the engine (certainly not to me), What does the Message Watcher say? If on clicking on a line in the fld fires a salvo of messages, somewhere - frontscript, backscript, card or stack script a handler is being fired that sends the focus elsewhere; apparently the card. Do a global script search for 'go', 'send', 'select' and 'focus'. There are probably other ways to remove the focus but those come readily to mind. I don't see anything in my mouseup script that would change the focus: on mouseup tBtn select empty -- putting focus on me here doesn't fix the problem put getGridCell() into g -- doesn't go to or select anything put item 1 of g into lineNbr put item 2 of g into colNbr if lineNbr = empty then exit mouseup else set the hilitedline of me to lineNbr -- this should put the focus in the field end if put line lineNbr of me into listEntry put getItem(listEntry, 1, tab) into noteTitle -- doesn't go to or select anything displayNote noteTitle -- fetches a customprop and puts it into the display field -- but this shouldn't move the focus -- putting focus on me here doesn't fix the problem if tBtn 3 then exit mouseup put popChoose(rename,delete) into u switch u case rename renameNote noteTitle break case delete answer Are you sure you want to delete this note? This is not undo-able! with OK or whoops! \ as sheet if it is not OK then exit to top deleteNote lineNbr, noteTitle break end switch end mouseup I'll take a look at the messagewatcher when I get a chance. -- Peter Peter M. Brigham pmb...@gmail.com http://home.comcast.net/~pmbrig ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: list field not getting arrowkey msg
It's pretty clear LC doesn't think the list field has focus not sure why that would be. Maybe a focus on me from the list field's selectionChanged handler would help? On Mon, Jul 20, 2015 at 11:48 AM Peter Brigham pmb...@gmail.com wrote: Unfortunately, I still get nothing with the hilitedlines of me in the field script. The arrowkey message is not going to the field. Here's the arrowkey handler in the card script. This works fine but I don't know why it should be necessary. on arrowkey what put hilitedline of fld notesList into lineNbr put the number of lines of fld notesList into totNbr switch what case left case right pass arrowkey break case up if lineNbr = 1 then put totNbr into nextLineNbr else put lineNbr - 1 into nextLineNbr end if break case down if lineNbr = nextLineNbr then put 1 into nextLineNbr else put lineNbr + 1 into nextLineNbr end if break end switch set the hilitedline of fld notesList to nextLineNbr put line nextLineNbr of fld notesList into listEntry put getItem(listEntry, 1, tab) into noteTitle displayNote noteTitle pass arrowkey end arrowkey -- Peter Peter M. Brigham pmb...@gmail.com http://home.comcast.net/~pmbrig On Mon, Jul 20, 2015 at 2:14 PM, J. Landman Gay jac...@hyperactivesw.com wrote: On 7/19/2015 10:17 PM, Peter M. Brigham wrote: There is a line selected. If I put the following into the field script: on arrowkey put the hilitedlines end arrowkey then click in the field to select a line, then hit up- or down-arrowkey, nothing happens. The field is apparently not getting the arrowkey message. It's acting as though the traversalon of the field is false, but it's not. What do you get if you put this into the field script: on mouseUp put the hilitedlines of me end mouseUp BTW, I think your arrowkey test needs of the target. Hilitedlines without an object reference is probably always empty. -- Jacqueline Landman Gay | jac...@hyperactivesw.com HyperActive Software | http://www.hyperactivesw.com ___ use-livecode mailing list use-livecode@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@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@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: list field not getting arrowkey msg
On 7/19/2015 10:17 PM, Peter M. Brigham wrote: There is a line selected. If I put the following into the field script: on arrowkey put the hilitedlines end arrowkey then click in the field to select a line, then hit up- or down-arrowkey, nothing happens. The field is apparently not getting the arrowkey message. It's acting as though the traversalon of the field is false, but it's not. What do you get if you put this into the field script: on mouseUp put the hilitedlines of me end mouseUp BTW, I think your arrowkey test needs of the target. Hilitedlines without an object reference is probably always empty. -- Jacqueline Landman Gay | jac...@hyperactivesw.com HyperActive Software | http://www.hyperactivesw.com ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: list field not getting arrowkey msg
Unfortunately, I still get nothing with the hilitedlines of me in the field script. The arrowkey message is not going to the field. Here's the arrowkey handler in the card script. This works fine but I don't know why it should be necessary. on arrowkey what put hilitedline of fld notesList into lineNbr put the number of lines of fld notesList into totNbr switch what case left case right pass arrowkey break case up if lineNbr = 1 then put totNbr into nextLineNbr else put lineNbr - 1 into nextLineNbr end if break case down if lineNbr = nextLineNbr then put 1 into nextLineNbr else put lineNbr + 1 into nextLineNbr end if break end switch set the hilitedline of fld notesList to nextLineNbr put line nextLineNbr of fld notesList into listEntry put getItem(listEntry, 1, tab) into noteTitle displayNote noteTitle pass arrowkey end arrowkey -- Peter Peter M. Brigham pmb...@gmail.com http://home.comcast.net/~pmbrig On Mon, Jul 20, 2015 at 2:14 PM, J. Landman Gay jac...@hyperactivesw.com wrote: On 7/19/2015 10:17 PM, Peter M. Brigham wrote: There is a line selected. If I put the following into the field script: on arrowkey put the hilitedlines end arrowkey then click in the field to select a line, then hit up- or down-arrowkey, nothing happens. The field is apparently not getting the arrowkey message. It's acting as though the traversalon of the field is false, but it's not. What do you get if you put this into the field script: on mouseUp put the hilitedlines of me end mouseUp BTW, I think your arrowkey test needs of the target. Hilitedlines without an object reference is probably always empty. -- Jacqueline Landman Gay | jac...@hyperactivesw.com HyperActive Software | http://www.hyperactivesw.com ___ use-livecode mailing list use-livecode@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@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: list field not getting arrowkey msg
But did you try a mouseUp handler? I'm curious if the field is recognized in any way. On 7/20/2015 1:47 PM, Peter Brigham wrote: Unfortunately, I still get nothing with the hilitedlines of me in the field script. The arrowkey message is not going to the field. Here's the arrowkey handler in the card script. This works fine but I don't know why it should be necessary. on arrowkey what put hilitedline of fld notesList into lineNbr put the number of lines of fld notesList into totNbr switch what case left case right pass arrowkey break case up if lineNbr = 1 then put totNbr into nextLineNbr else put lineNbr - 1 into nextLineNbr end if break case down if lineNbr = nextLineNbr then put 1 into nextLineNbr else put lineNbr + 1 into nextLineNbr end if break end switch set the hilitedline of fld notesList to nextLineNbr put line nextLineNbr of fld notesList into listEntry put getItem(listEntry, 1, tab) into noteTitle displayNote noteTitle pass arrowkey end arrowkey -- Peter Peter M. Brigham pmb...@gmail.com http://home.comcast.net/~pmbrig On Mon, Jul 20, 2015 at 2:14 PM, J. Landman Gay jac...@hyperactivesw.com wrote: On 7/19/2015 10:17 PM, Peter M. Brigham wrote: There is a line selected. If I put the following into the field script: on arrowkey put the hilitedlines end arrowkey then click in the field to select a line, then hit up- or down-arrowkey, nothing happens. The field is apparently not getting the arrowkey message. It's acting as though the traversalon of the field is false, but it's not. What do you get if you put this into the field script: on mouseUp put the hilitedlines of me end mouseUp BTW, I think your arrowkey test needs of the target. Hilitedlines without an object reference is probably always empty. -- Jacqueline Landman Gay | jac...@hyperactivesw.com HyperActive Software | http://www.hyperactivesw.com ___ use-livecode mailing list use-livecode@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@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode -- Jacqueline Landman Gay | jac...@hyperactivesw.com HyperActive Software | http://www.hyperactivesw.com ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
list field not getting arrowkey msg
I have a list field in one stack that isn't behaving properly. List fields are supposed to allow up and down arrowkeys to move the hilited line. From the dictionary: If a field's listBehavior property is set to true, and the user clicks a line, the entire line is highlighted. The Up and Down arrow keys move the selection up or down. I have a similar field in another stack that works exactly as expected. The two fields both have their listbehavior set to true -- in fact, AFAICS all their basic properties are the same. I have no arrowkey handlers in any scripts in the misbehaving stack. Ideas? -- Peter Peter M. Brigham pmb...@gmail.com http://home.comcast.net/~pmbrig ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: list field not getting arrowkey msg
Not sure if this is what you're seeing, but if you are using tab to enter the next field, then using arrow keys to navigate up and down, it doesn't work. (6.7.6) When you tab into a list field, the hilite remains, but there is no selection in the field. IE no insertion point, so the arrow keys don't work. I've found that if you select the hilited line as you tab into the field it solves this problem. If this is the problem you are seeing, clicking a line in the recalcitrant field should make the arrow keys start working, because the click selects a line. Another direction to solve it would be to catch the arrowkey message in the field, and if there is a hilite, but no lines selected, select the hilited line then pass arrowkey. If there are no lines selected, and no hilites, select and hilite the first line. If I understand correctly, the second part should only be necessary if you have toggle hilites turned on. (because otherwise when you tab into the field, a line is selected.) I just noticed another interesting thing (Still in 6.7.6) Selecting click to toggle in the inspector puts a checkmark into mutli-line and non-contiguous (as it should?) but clicking away and coming back to the object, only click to toggle is still selected. Oh, and final note on this, if you have multiline non-contiguous selected you'd have to account for that too. Check the focused object when the arrow keys aren't working. If the correct field is focused, check the selectedline to see if there is one. If not, the arrow keys fail to work. On Sun, Jul 19, 2015 at 7:07 AM, Peter M. Brigham pmb...@gmail.com wrote: I have a list field in one stack that isn't behaving properly. List fields are supposed to allow up and down arrowkeys to move the hilited line. From the dictionary: If a field's listBehavior property is set to true, and the user clicks a line, the entire line is highlighted. The Up and Down arrow keys move the selection up or down. I have a similar field in another stack that works exactly as expected. The two fields both have their listbehavior set to true -- in fact, AFAICS all their basic properties are the same. I have no arrowkey handlers in any scripts in the misbehaving stack. Ideas? -- Peter Peter M. Brigham pmb...@gmail.com http://home.comcast.net/~pmbrig ___ use-livecode mailing list use-livecode@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@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: list field not getting arrowkey msg
On Jul 19, 2015, at 10:12 AM, Mike Bonner wrote: Not sure if this is what you're seeing, but if you are using tab to enter the next field, then using arrow keys to navigate up and down, it doesn't work. (6.7.6) When you tab into a list field, the hilite remains, but there is no selection in the field. IE no insertion point, so the arrow keys don't work. Not using tab to select into the field. Clicking on the line, it gets selected, then arrowkey does nothing. I've found that if you select the hilited line as you tab into the field it solves this problem. If this is the problem you are seeing, clicking a line in the recalcitrant field should make the arrow keys start working, because the click selects a line. Another direction to solve it would be to catch the arrowkey message in the field, and if there is a hilite, but no lines selected, select the hilited line then pass arrowkey. If there are no lines selected, and no hilites, select and hilite the first line. If I understand correctly, the second part should only be necessary if you have toggle hilites turned on. (because otherwise when you tab into the field, a line is selected.) There is a line selected. If I put the following into the field script: on arrowkey put the hilitedlines end arrowkey then click in the field to select a line, then hit up- or down-arrowkey, nothing happens. The field is apparently not getting the arrowkey message. It's acting as though the traversalon of the field is false, but it's not. I just noticed another interesting thing (Still in 6.7.6) Selecting click to toggle in the inspector puts a checkmark into mutli-line and non-contiguous (as it should?) but clicking away and coming back to the object, only click to toggle is still selected. toggleHilites, mulitpleHilite, and noncontiguousHilites are all false. Oh, and final note on this, if you have multiline non-contiguous selected you'd have to account for that too. Check the focused object when the arrow keys aren't working. If the correct field is focused, check the selectedline to see if there is one. If not, the arrow keys fail to work. if I put this into the card script: on arrowkey what put the short name of the focusedobject pass arrowkey end arrowkey then click on a line in the list field, then hit up-arrowkey, I get card id 1002 ??? Having found that the focus is on the card, for reasons best known to the engine (certainly not to me), I have a workaround, by putting an on arrowkey handler into the card script and then hiliting the next/prev line of the field and duplicating the relevant portion of the field mouseUp handler in the card script -- but I don't know why I should have to do that. Why isn't the field getting the arrowkey message after I click on a line in the field??? That works fine in my other stack, with the list field having the same properties. -- Peter Peter M. Brigham pmb...@gmail.com http://home.comcast.net/~pmbrig On Sun, Jul 19, 2015 at 7:07 AM, Peter M. Brigham pmb...@gmail.com wrote: I have a list field in one stack that isn't behaving properly. List fields are supposed to allow up and down arrowkeys to move the hilited line. From the dictionary: If a field's listBehavior property is set to true, and the user clicks a line, the entire line is highlighted. The Up and Down arrow keys move the selection up or down. I have a similar field in another stack that works exactly as expected. The two fields both have their listbehavior set to true -- in fact, AFAICS all their basic properties are the same. I have no arrowkey handlers in any scripts in the misbehaving stack. Ideas? -- Peter Peter M. Brigham pmb...@gmail.com http://home.comcast.net/~pmbrig ___ use-livecode mailing list use-livecode@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@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@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: list field not getting arrowkey msg
Strange that its not actually taking focus when you click on it. As far as there being a selection, it's weird. The tab thing I was mentioning freaked me out. Focusing the object with tab worked (the focusedobject said what I expected) but the arrow keys wouldn't work. When checking the selectedline, there was no selected line. Actually clicking into the field would then make the arrow keys work, and the selectedline showed correctly. Seems to me that tabbing into a field (which correctly focuses on the field) would let the arrowkeys work but apparently not. Either way, glad you have a method figured out. On Sun, Jul 19, 2015 at 9:17 PM, Peter M. Brigham pmb...@gmail.com wrote: On Jul 19, 2015, at 10:12 AM, Mike Bonner wrote: Not sure if this is what you're seeing, but if you are using tab to enter the next field, then using arrow keys to navigate up and down, it doesn't work. (6.7.6) When you tab into a list field, the hilite remains, but there is no selection in the field. IE no insertion point, so the arrow keys don't work. Not using tab to select into the field. Clicking on the line, it gets selected, then arrowkey does nothing. I've found that if you select the hilited line as you tab into the field it solves this problem. If this is the problem you are seeing, clicking a line in the recalcitrant field should make the arrow keys start working, because the click selects a line. Another direction to solve it would be to catch the arrowkey message in the field, and if there is a hilite, but no lines selected, select the hilited line then pass arrowkey. If there are no lines selected, and no hilites, select and hilite the first line. If I understand correctly, the second part should only be necessary if you have toggle hilites turned on. (because otherwise when you tab into the field, a line is selected.) There is a line selected. If I put the following into the field script: on arrowkey put the hilitedlines end arrowkey then click in the field to select a line, then hit up- or down-arrowkey, nothing happens. The field is apparently not getting the arrowkey message. It's acting as though the traversalon of the field is false, but it's not. I just noticed another interesting thing (Still in 6.7.6) Selecting click to toggle in the inspector puts a checkmark into mutli-line and non-contiguous (as it should?) but clicking away and coming back to the object, only click to toggle is still selected. toggleHilites, mulitpleHilite, and noncontiguousHilites are all false. Oh, and final note on this, if you have multiline non-contiguous selected you'd have to account for that too. Check the focused object when the arrow keys aren't working. If the correct field is focused, check the selectedline to see if there is one. If not, the arrow keys fail to work. if I put this into the card script: on arrowkey what put the short name of the focusedobject pass arrowkey end arrowkey then click on a line in the list field, then hit up-arrowkey, I get card id 1002 ??? Having found that the focus is on the card, for reasons best known to the engine (certainly not to me), I have a workaround, by putting an on arrowkey handler into the card script and then hiliting the next/prev line of the field and duplicating the relevant portion of the field mouseUp handler in the card script -- but I don't know why I should have to do that. Why isn't the field getting the arrowkey message after I click on a line in the field??? That works fine in my other stack, with the list field having the same properties. -- Peter Peter M. Brigham pmb...@gmail.com http://home.comcast.net/~pmbrig On Sun, Jul 19, 2015 at 7:07 AM, Peter M. Brigham pmb...@gmail.com wrote: I have a list field in one stack that isn't behaving properly. List fields are supposed to allow up and down arrowkeys to move the hilited line. From the dictionary: If a field's listBehavior property is set to true, and the user clicks a line, the entire line is highlighted. The Up and Down arrow keys move the selection up or down. I have a similar field in another stack that works exactly as expected. The two fields both have their listbehavior set to true -- in fact, AFAICS all their basic properties are the same. I have no arrowkey handlers in any scripts in the misbehaving stack. Ideas? -- Peter Peter M. Brigham pmb...@gmail.com http://home.comcast.net/~pmbrig ___ use-livecode mailing list use-livecode@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@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription
Scripter's Scrapbook (was arrowkey)
A reminder that the Scripter's Scrapbook is designed to do exactly this... www.ssbk.co.uk or http://www.runrev.com/store/product/scripters-scrapbook-1-0-0/ And if you want a 'Socks' category, you can have that too! Hugh Senior FLCo On Dec 20, 2011, at 7:04 AM, Mike Bonner wrote: I saw the other input for this problem, I'm thinking that checking keysdown() for the arrow keycodes would be a more reliable solution depending on your needs. I swear I keep learning new things on this list and in the forums. Luckily I have a horrible memory so I get the bonus of relearning the same thing over and over! Yeah, me too -- as one of my patients once said to me, I have a mind like a steel sieve. I save lots of tips from this list in a stack I've made, and thank God for LC's find command Wish it worked for socks. (Anyone seen a sort of a brownish-greenish one, medium, almost new?) -- Peter Peter M. Brigham ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: arrowKey
Thank you Mike, I was able to use your script. I realize that getting the arrows key is not as trivial as get the mouse or get the optionKey. However your script works fine. Thanks a lot Paolo On Mon, Dec 19, 2011 at 5:28 PM, Mike Bonner bonnm...@gmail.com wrote: I'm sure this doesn't cover every possibility but will something like the following work? -- in the card I put on arrowKey pKey set the cKeyDown of this stack to pKey pass arrowKey end arrowKey on rawKeyUp pKey if pKey is among the items of 65361,65362,65363,65364 then if the cKeyDown of this stack is not empty then set the cKeyDown of this stack to empty end if pass rawKeyUp end rawKeyUp --And in a button I put local tRunning on mouseUp if tRunning is empty then put false into tRunning put not tRunning into tRunning checkarrow end mouseUp command checkArrow if tRunning then switch (the cKeyDown of this stack is empty) case false put the cKeyDown of this stack break case true put No Key is down break end switch send checkArrow to me in 10 milliseconds end if end checkArrow Depending on your needs this might be enough. It doesn't handle 2 arrow keys being pressed (shouldn't be too bad to modify it so that you can handle multiple arrow presses, instead of just checking against ALL arrow keycodes could have a property for each direction keycode and only wipe out the specific arrow key that is released) To test, set up the stack as described, click the button to start the monitoring and then hit your keys. Should show results in the msg box. On Mon, Dec 19, 2011 at 7:51 AM, paolo mazza mazzapaoloit...@gmail.comwrote: Hi All, how can I check if the arrowKey up is down or is up ? For example, for the option Key I can write .. if the optioKey is down then..., for the mouse I can write ... if the mouse is down then ... What about the arrow keys ? All the best Paolo ___ use-livecode mailing list use-livecode@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@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@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: arrowKey
I saw the other input for this problem, I'm thinking that checking keysdown() for the arrow keycodes would be a more reliable solution depending on your needs. I swear I keep learning new things on this list and in the forums. Luckily I have a horrible memory so I get the bonus of relearning the same thing over and over! On Tue, Dec 20, 2011 at 4:13 AM, paolo mazza mazzapaoloit...@gmail.comwrote: Thank you Mike, I was able to use your script. I realize that getting the arrows key is not as trivial as get the mouse or get the optionKey. However your script works fine. Thanks a lot Paolo On Mon, Dec 19, 2011 at 5:28 PM, Mike Bonner bonnm...@gmail.com wrote: I'm sure this doesn't cover every possibility but will something like the following work? -- in the card I put on arrowKey pKey set the cKeyDown of this stack to pKey pass arrowKey end arrowKey on rawKeyUp pKey if pKey is among the items of 65361,65362,65363,65364 then if the cKeyDown of this stack is not empty then set the cKeyDown of this stack to empty end if pass rawKeyUp end rawKeyUp --And in a button I put local tRunning on mouseUp if tRunning is empty then put false into tRunning put not tRunning into tRunning checkarrow end mouseUp command checkArrow if tRunning then switch (the cKeyDown of this stack is empty) case false put the cKeyDown of this stack break case true put No Key is down break end switch send checkArrow to me in 10 milliseconds end if end checkArrow Depending on your needs this might be enough. It doesn't handle 2 arrow keys being pressed (shouldn't be too bad to modify it so that you can handle multiple arrow presses, instead of just checking against ALL arrow keycodes could have a property for each direction keycode and only wipe out the specific arrow key that is released) To test, set up the stack as described, click the button to start the monitoring and then hit your keys. Should show results in the msg box. On Mon, Dec 19, 2011 at 7:51 AM, paolo mazza mazzapaoloit...@gmail.com wrote: Hi All, how can I check if the arrowKey up is down or is up ? For example, for the option Key I can write .. if the optioKey is down then..., for the mouse I can write ... if the mouse is down then ... What about the arrow keys ? All the best Paolo ___ use-livecode mailing list use-livecode@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@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@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@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: arrowKey
On Dec 20, 2011, at 7:04 AM, Mike Bonner wrote: I saw the other input for this problem, I'm thinking that checking keysdown() for the arrow keycodes would be a more reliable solution depending on your needs. I swear I keep learning new things on this list and in the forums. Luckily I have a horrible memory so I get the bonus of relearning the same thing over and over! Yeah, me too -- as one of my patients once said to me, I have a mind like a steel sieve. I save lots of tips from this list in a stack I've made, and thank God for LC's find command Wish it worked for socks. (Anyone seen a sort of a brownish-greenish one, medium, almost new?) -- Peter Peter M. Brigham pmb...@gmail.com http://home.comcast.net/~pmbrig ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: arrowKey
I gave up on socks years ago. They're not worth the temporal disturbance. On Tue, Dec 20, 2011 at 7:31 AM, Peter M. Brigham, MD pmb...@gmail.comwrote: On Dec 20, 2011, at 7:04 AM, Mike Bonner wrote: I saw the other input for this problem, I'm thinking that checking keysdown() for the arrow keycodes would be a more reliable solution depending on your needs. I swear I keep learning new things on this list and in the forums. Luckily I have a horrible memory so I get the bonus of relearning the same thing over and over! Yeah, me too -- as one of my patients once said to me, I have a mind like a steel sieve. I save lots of tips from this list in a stack I've made, and thank God for LC's find command Wish it worked for socks. (Anyone seen a sort of a brownish-greenish one, medium, almost new?) -- Peter Peter M. Brigham pmb...@gmail.com http://home.comcast.net/~pmbrig ___ use-livecode mailing list use-livecode@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@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: arrowKey
Thank you Bob. Thank you Mike.. Here it is my code to move a button using the arrow keys. local tSTARTCONTROL on StartControl put true into tSTARTCONTROL ControlKeys end StartControl on StopControl put false into tSTARTCONTROL end StopControl on ControlKeys if keysDown() is 65361 then MoveLeft end if if keysDown() is 65362 then MoveUp end if if keysDown() is 65363 then MoveRight end if if keysDown() is 65364 then MoveDown end if if tSTARTCONTROL is true then send ControlKeys to me in 0.2 sec end if end ControlKeys on MoveLeft set the left of button square to (the left of button square - 1 ) end MoveLeft on MoveRight set the left of button square to (the left of button square + 1 ) end MoveRight on MoveUp set the top of button square to (the top of button square - 1 ) end MoveUp on MoveDown set the top of button square to (the top of button square + 1 ) end MoveDown It works !! All the best. Paolo On Tue, Dec 20, 2011 at 3:04 PM, Mike Bonner bonnm...@gmail.com wrote: I saw the other input for this problem, I'm thinking that checking keysdown() for the arrow keycodes would be a more reliable solution depending on your needs. I swear I keep learning new things on this list and in the forums. Luckily I have a horrible memory so I get the bonus of relearning the same thing over and over! On Tue, Dec 20, 2011 at 4:13 AM, paolo mazza mazzapaoloit...@gmail.comwrote: Thank you Mike, I was able to use your script. I realize that getting the arrows key is not as trivial as get the mouse or get the optionKey. However your script works fine. Thanks a lot Paolo On Mon, Dec 19, 2011 at 5:28 PM, Mike Bonner bonnm...@gmail.com wrote: I'm sure this doesn't cover every possibility but will something like the following work? -- in the card I put on arrowKey pKey set the cKeyDown of this stack to pKey pass arrowKey end arrowKey on rawKeyUp pKey if pKey is among the items of 65361,65362,65363,65364 then if the cKeyDown of this stack is not empty then set the cKeyDown of this stack to empty end if pass rawKeyUp end rawKeyUp --And in a button I put local tRunning on mouseUp if tRunning is empty then put false into tRunning put not tRunning into tRunning checkarrow end mouseUp command checkArrow if tRunning then switch (the cKeyDown of this stack is empty) case false put the cKeyDown of this stack break case true put No Key is down break end switch send checkArrow to me in 10 milliseconds end if end checkArrow Depending on your needs this might be enough. It doesn't handle 2 arrow keys being pressed (shouldn't be too bad to modify it so that you can handle multiple arrow presses, instead of just checking against ALL arrow keycodes could have a property for each direction keycode and only wipe out the specific arrow key that is released) To test, set up the stack as described, click the button to start the monitoring and then hit your keys. Should show results in the msg box. On Mon, Dec 19, 2011 at 7:51 AM, paolo mazza mazzapaoloit...@gmail.com wrote: Hi All, how can I check if the arrowKey up is down or is up ? For example, for the option Key I can write .. if the optioKey is down then..., for the mouse I can write ... if the mouse is down then ... What about the arrow keys ? All the best Paolo ___ use-livecode mailing list use-livecode@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@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@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@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@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: arrowKey
Jacque was wearing it yesterday, along with a white kneehigh with blue and red stripes. Bob On Dec 20, 2011, at 6:31 AM, Peter M. Brigham, MD wrote: Yeah, me too -- as one of my patients once said to me, I have a mind like a steel sieve. I save lots of tips from this list in a stack I've made, and thank God for LC's find command Wish it worked for socks. (Anyone seen a sort of a brownish-greenish one, medium, almost new?) -- Peter Peter M. Brigham ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: arrowKey
Is there some reason not to do it this way?: on arrowkey which put the loc of button square into tRect switch which case left subtract 1 from item 1 of tRect break case right add 1 to item 1 of tRect break case up subtract 1 from item 2 of tRect break case down add 1 to item 2 of tRect break default pass arrowkey break end switch set the loc of button square to tRect end arrowkey Put the handler in an invisible button and insert the button's script as a frontscript on opencard. If you put it into the card script then it will work fine usually, but the problem comes if the user has switched the focus off the card by clicking on some other control, so a frontscript is safer that way. Remember to remove the frontscript on closecard, so it doesn't start intercepting arrowkey messages elsewhere. -- Peter Peter M. Brigham pmb...@gmail.com http://home.comcast.net/~pmbrig On Dec 20, 2011, at 7:49 AM, paolo mazza wrote: Thank you Bob. Thank you Mike.. Here it is my code to move a button using the arrow keys. local tSTARTCONTROL on StartControl put true into tSTARTCONTROL ControlKeys end StartControl on StopControl put false into tSTARTCONTROL end StopControl on ControlKeys if keysDown() is 65361 then MoveLeft end if if keysDown() is 65362 then MoveUp end if if keysDown() is 65363 then MoveRight end if if keysDown() is 65364 then MoveDown end if if tSTARTCONTROL is true then send ControlKeys to me in 0.2 sec end if end ControlKeys on MoveLeft set the left of button square to (the left of button square - 1 ) end MoveLeft on MoveRight set the left of button square to (the left of button square + 1 ) end MoveRight on MoveUp set the top of button square to (the top of button square - 1 ) end MoveUp on MoveDown set the top of button square to (the top of button square + 1 ) end MoveDown It works !! All the best. Paolo On Tue, Dec 20, 2011 at 3:04 PM, Mike Bonner bonnm...@gmail.com wrote: I saw the other input for this problem, I'm thinking that checking keysdown() for the arrow keycodes would be a more reliable solution depending on your needs. I swear I keep learning new things on this list and in the forums. Luckily I have a horrible memory so I get the bonus of relearning the same thing over and over! On Tue, Dec 20, 2011 at 4:13 AM, paolo mazza mazzapaoloit...@gmail.comwrote: Thank you Mike, I was able to use your script. I realize that getting the arrows key is not as trivial as get the mouse or get the optionKey. However your script works fine. Thanks a lot Paolo On Mon, Dec 19, 2011 at 5:28 PM, Mike Bonner bonnm...@gmail.com wrote: I'm sure this doesn't cover every possibility but will something like the following work? -- in the card I put on arrowKey pKey set the cKeyDown of this stack to pKey pass arrowKey end arrowKey on rawKeyUp pKey if pKey is among the items of 65361,65362,65363,65364 then if the cKeyDown of this stack is not empty then set the cKeyDown of this stack to empty end if pass rawKeyUp end rawKeyUp --And in a button I put local tRunning on mouseUp if tRunning is empty then put false into tRunning put not tRunning into tRunning checkarrow end mouseUp command checkArrow if tRunning then switch (the cKeyDown of this stack is empty) case false put the cKeyDown of this stack break case true put No Key is down break end switch send checkArrow to me in 10 milliseconds end if end checkArrow Depending on your needs this might be enough. It doesn't handle 2 arrow keys being pressed (shouldn't be too bad to modify it so that you can handle multiple arrow presses, instead of just checking against ALL arrow keycodes could have a property for each direction keycode and only wipe out the specific arrow key that is released) To test, set up the stack as described, click the button to start the monitoring and then hit your keys. Should show results in the msg box. On Mon, Dec 19, 2011 at 7:51 AM, paolo mazza mazzapaoloit...@gmail.com wrote: Hi All, how can I check if the arrowKey up is down or is up ? For example, for the option Key I can write .. if the optioKey is down then..., for the mouse I can write ... if the mouse is down then ... What about the arrow keys ? All the best Paolo ___ use-livecode mailing list use-livecode@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
Re: arrowKey
On 12/20/11 10:07 AM, Bob Sneidar wrote: Jacque was wearing it yesterday, along with a white kneehigh with blue and red stripes. I found it in my sock drawer. I thought it was yours. -- Jacqueline Landman Gay | jac...@hyperactivesw.com HyperActive Software | http://www.hyperactivesw.com ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: arrowKey
Nope, it's mine. I hope at least it got to you *after* it went through my wash cycle If not, I apologize. I'm definitely putting in an enhancement request to the QC to extend the find command to socks. I bet Scott Raney anticipated the need and built it into an obscure corner of the engine somewhere. -- Peter Peter M. Brigham pmb...@gmail.com http://home.comcast.net/~pmbrig On Dec 20, 2011, at 10:19 AM, J. Landman Gay wrote: On 12/20/11 10:07 AM, Bob Sneidar wrote: Jacque was wearing it yesterday, along with a white kneehigh with blue and red stripes. I found it in my sock drawer. I thought it was yours. -- Jacqueline Landman Gay | jac...@hyperactivesw.com HyperActive Software | http://www.hyperactivesw.com ___ use-livecode mailing list use-livecode@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@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
arrowKey
Hi All, how can I check if the arrowKey up is down or is up ? For example, for the option Key I can write .. if the optioKey is down then..., for the mouse I can write ... if the mouse is down then ... What about the arrow keys ? All the best Paolo ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: arrowKey
I'm sure this doesn't cover every possibility but will something like the following work? -- in the card I put on arrowKey pKey set the cKeyDown of this stack to pKey pass arrowKey end arrowKey on rawKeyUp pKey if pKey is among the items of 65361,65362,65363,65364 then if the cKeyDown of this stack is not empty then set the cKeyDown of this stack to empty end if pass rawKeyUp end rawKeyUp --And in a button I put local tRunning on mouseUp if tRunning is empty then put false into tRunning put not tRunning into tRunning checkarrow end mouseUp command checkArrow if tRunning then switch (the cKeyDown of this stack is empty) case false put the cKeyDown of this stack break case true put No Key is down break end switch send checkArrow to me in 10 milliseconds end if end checkArrow Depending on your needs this might be enough. It doesn't handle 2 arrow keys being pressed (shouldn't be too bad to modify it so that you can handle multiple arrow presses, instead of just checking against ALL arrow keycodes could have a property for each direction keycode and only wipe out the specific arrow key that is released) To test, set up the stack as described, click the button to start the monitoring and then hit your keys. Should show results in the msg box. On Mon, Dec 19, 2011 at 7:51 AM, paolo mazza mazzapaoloit...@gmail.comwrote: Hi All, how can I check if the arrowKey up is down or is up ? For example, for the option Key I can write .. if the optioKey is down then..., for the mouse I can write ... if the mouse is down then ... What about the arrow keys ? All the best Paolo ___ use-livecode mailing list use-livecode@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@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode