Mobile scroller misaligned

J. Landman Gay jacque at hyperactivesw.com
Fri Oct 25 15:20:47 EDT 2019


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





More information about the use-livecode mailing list