Hmmm, today it's not working… not sure how to debug… but buildomh on stand 
alone with this in the backscript


command CreateScroller pName -- scrolling regions,groups, fields

if not isMobile() then exit CreateScroller

deleteMobileControl pName -- delete any existing

put (the rect of control pName) into tRect

mobileControlCreate "scroller", pName

mobileControlSet pName, "rect", tRect

put ("0,0," & (the formattedwidth of control pName) & "," & the formattedheight 
of control pName) into tRect

mobileControlSet pName, "contentRect" , tRect

mobileControlSet pName, "hScroll" , 0

mobileControlSet pName, "vScroll" , 0

mobileControlSet pName, "hIndicator" , false

mobileControlSet pName, "visible", true

end CreateScroller

on scrollerDidScroll hScrolled, vScrolled

put mobileControlTarget() into tControlID

set the vscroll of control tControlID to vscrolled

pass scrollerDidScroll

end scrollerDidScroll

is failing… the control will not scroll


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

Reply via email to