Mobile scroller misaligned
Ralph DiMola
rdimola at evergreeninfo.net
Fri Oct 25 16:42:10 EDT 2019
J,
Sorry I meant send this to you last time you asked and got sidetracked, then spaced out and forgot. After creating the scroller do a send in time to a handler to set the non-zero scroll. I use .5 seconds but less might work.
Ralph DiMola
IT Director
Evergreen Information Services
rdimola at evergreeninfo.net
-----Original Message-----
From: use-livecode [mailto:use-livecode-bounces at lists.runrev.com] On Behalf Of J. Landman Gay via use-livecode
Sent: Friday, October 25, 2019 3:21 PM
To: How to use LiveCode
Cc: J. Landman Gay
Subject: Re: Mobile scroller misaligned
I am still struggling with native scroller alignment when the scroll must be set to something other than zero. Since I've asked here twice with little response, maybe I just need to know more about how scrollers work under the hood. Panos? Anyone?
* If I set the vScroll or hScroll of a scroller, are any messages sent?
Does this affect the underlying LC group in any way?
* Right now, I'm setting the scroll of a LC group and then setting up a native scroller to use the same scroll. This fails. Should I be reversing the process, and set the scroller's scroll first followed by the LC group scroll? That's kind of how it works when scrollerDidScroll is called. I wasn't able to get this to work but maybe I missed something.
For testing, I copied a card from the real project with the same scroller scripts. I could not set the scroll in the handler that created the scroller, but I could set it later after the creation handler finished. But in the real project, identical scripts fail. I can't trace why.
I've been tring to fix this for a couple of months now, so any info would be appreciated.
On 9/27/19 3:04 PM, J. Landman Gay via use-livecode wrote:
> I must be doing something wrong, I still can't get a mobile scroller
> to align at anything other than zero. It fails on scrollers placed
> over either images or scrolling fields.
>
> I have a list field with a lot of lines, grouped, with the group
> shorter than the field.
>
> On mobile (Android in my case) a handler sets the hilitedLine of the
> field and scrolls the group to display it. I create a native scroller
> on the group and set the vScroll to the same scroll as the group. I
> can't get the scroller to align correctly.
>
> The list shows on demand, so the scroller has to be created when the
> group becomes visible, and has to match the group's current scroll.
>
> mobileControlSet pName, "vScroll", tVScroll -- fails unless it's
> zero
>
> Has anyone done this successfully? I'm pretty sure there's something
> wrong with my script.
>
--
Jacqueline Landman Gay | jacque at hyperactivesw.com
HyperActive Software | http://www.hyperactivesw.com
_______________________________________________
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