Swipe gestures on a mobile scroller

Paul Hibbert paul at livecode.org
Sun Nov 20 14:23:15 EST 2016


> On Nov 20, 2016, at 11:03 AM, J. Landman Gay <jacque at hyperactivesw.com <mailto:jacque at hyperactivesw.com>> wrote:
> 
> does that mean the hscroll property of the mobile scroller must be true?

No, the hScroll prop is still false, you are just detecting and using (diverting) the information that the scrollerDidScroll message would have used to set the hScroll, but it never gets set.

This is the handler:

on scrollerDidScroll hOffset, vOffset // Scroll or Swipe Detect //
 
   if the hScroll of group "scrollArea" <0 then ##-->> Detects the Horiz swipe <<--##
      moveBack
   else if the hScroll of group "scrollArea" >0 then
      moveForward
   end if
   
   set the vScroll of group "scrollArea" to vOffset ##-->>  Scroll the field vertically <<—##

end scrollerDidScroll


It is just a workaround, and it’s not perfect, but may keep you going until the main problem is fixed.

Paul


More information about the use-livecode mailing list