@Richard: Thanks… confirmed… today it is working, yesterday it was not… go figure. create scroller and scrollerdidscroll now in our backscript. awesome!
"Instead, a backscript scans controls during preOpenCard and anything that needs a scroller gets one instantiated for it (along the way it also turns off scrollbars, since of course those are only useful on desktop)." how does your scan "know" that a scroller is needed or not? And since I would prefer not to have scrollbars even on desktop… I am putting this in to the [field | group] (see below) I need to find a way to move this also to the back script so that it can work everywhere.. I guess "target" is my friend here. or perhaps this is a case for a behavior, but I'm unable to work out yet how to make this generic because "the target" returns the object under the mouse and not the name of the group that the object is part of. local sMouseLoc, sStartLoc, on mouseDown put the mouseloc into sMouseLoc put sMouseLoc into sStartLoc if not isMobile() then setScroll end if end mouseDown on setScroll if the mouse is down then lock screen if item 2 of sMouseLoc > the mouseV then set the vscroll of me to the vscroll of me - (the mouseV - item 2 of sMouseLoc) else set the vscroll of me to the vscroll of me + (item 2 of sMouseLoc - the mouseV) end if put the mouseloc into sMouseLoc send "setScroll" to me in 20 millisec unlock screen else put empty into sMouseLoc end if end setScroll Now… if we can get *this* working from the backscript also for any field/group that needs to scroll, that will be even more awesome. From: use-livecode <use-livecode-boun...@lists.runrev.com> on behalf of Richard Gaskin <ambassa...@fourthworld.com> Reply-To: How LiveCode <use-livecode@lists.runrev.com> Date: Saturday, July 2, 2016 at 8:47 AM To: How LiveCode <use-livecode@lists.runrev.com> Subject: Re: Front and Back Scripts on Mobile I believe a more accurate description is that the scrollerDidScroll message is sent to the *script* that created the scroller, which many not necessarily be a stack. In my case it's a backscript, and it works well. It seemed painfully tedious to even think about typing scroller instantiation code for every controls that needs it, so I don't. Instead, a backscript scans controls during preOpenCard and anything that needs a scroller gets one instantiated for it (along the way it also turns off scrollbars, since of course those are only useful on desktop). _______________________________________________ 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