Scrolling on Mac OS X : groups vs fields

Randy Hengst iowahengst at mac.com
Sat Aug 3 10:26:43 EDT 2013


Hi All,

Any thoughts as to why my arrow keys don't show the rawKey numbers listed here?

I'm on a MacBook Pro 13 in… I get
65361 -- left arrow
65362 -- up arrow
65363 -- right arrow
65364 -- down arrow

be well,
randy hengst
-----
On Aug 2, 2013, at 8:29 PM, Alex Tweedly <alex at tweedly.net> wrote:

> Thanks Devin and Mac - that works fine.
> 
> -- Alex.
> P.S. I'm not sure how I would *ever* have found that in the dictionary / User Guide - so thanks again.
> 
> 
> 
> On 02/08/2013 17:32, Mac Bennett wrote:
>> This works for me, though you might need to adjust 'tStepsize':
>> 
>> --in group script
>> 
>> on  rawKeyDown pKey
>>   if the short name of me is not in the long name of target  then
>>       pass rawkeydown
>>    else
>>    put 45 into tStepSize -- adjust here the stepsize for scrolling
>>    switch pKey
>>       case "65309" -- scroll up
>>          set the vscroll of me to the vscroll of me - tStepSize
>>          break
>>       case "65308" -- scroll down
>>          set the vscroll of me to the vscroll of me + tStepSize
>>          break
>>    end switch
>> end if
>> pass rawkeydown
>> end rawKeyDown
>> 
>> (In light of the recent copyright discussion going on here, I would like to disclose that I 'borrowed' this entirely a few years ago, and can't remember where;  so apologies and thanks to the actual author.)
>> 
>> There are also a few similar examples in the "rawkeydown/up" entries in the Livecode Dictionary.
>> 
>> Mac
>> 
>> 
>> On Aug 2, 2013, at 10:53 AM, Devin Asay <devin_asay at byu.edu> wrote:
>> 
>>> Alex
>>> On Aug 2, 2013, at 2:43 AM, Alex Tweedly wrote:
>>> 
>>>> On OSX (10.8.4, MBP - but I doubt that matters), I can scroll using a two-finger touch (i.e. if the cursor is within an area that is scrollable, then generally I can touch with two fingers, and 'push up' or 'pull down' the window contents.
>>>> 
>>>> This includes LC fields - this scrolling "just works" for them.
>>>> 
>>>> If I create a group, set and lock its position and give it a scrollbar, then it gets the scrollbar, and all the traditional behaviour associated with that (i.e. the scrollbar can be dragged, etc.)
>>>> 
>>>> But it doesn't automatically get the two-finger touch behaviour.
>>>> 
>>>> Is there some way I can enable that ? Do I need to program this myself ?
>>>> 
>>>> It looks as though the "touchStart, touchEnd, etc. are implemented on mobile only, so I'm not sure where to start.
>>> I believe you have to handle scroll wheel actions using rawKeyDown or rawKeyUp (I forget which, and I'm not in a place I can check right now.) Just figure out which codes get sent when the scroll wheel is used and set the scroll of the group in your handler.
>>> 
>>> HTH
>>> 
>>> Devin
>>> 
>>> 
>>> Devin Asay
>>> Office of Digital Humanities
>>> Brigham Young University
>>> 
>>> 
>>> _______________________________________________
>>> use-livecode mailing list
>>> use-livecode at lists.runrev.com
>>> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
>>> http://lists.runrev.com/mailman/listinfo/use-livecode
>> 
>> _______________________________________________
>> use-livecode mailing list
>> use-livecode at lists.runrev.com
>> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
>> http://lists.runrev.com/mailman/listinfo/use-livecode
> 
> 
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode





More information about the use-livecode mailing list