never ending scroll?

Devin Asay devin_asay at byu.edu
Fri May 28 11:02:10 EDT 2010


On May 27, 2010, at 4:56 PM, Nicolas Cueto wrote:

> Tom,
> 
> The scroll-wheel I've in mind is in the "Add alarm" section of the
> iPhone's "Clock".
> 
> "Lazily loaded"? I guess I'm off to search that.
> 
> In the meantime, I'd still welcome example scripts of something that'd
> do an endless scroll of text in a text field, rather than a group, a
> table, a window, etc.

Hi Nicolas,

The relatively new addition to revTalk, 'wrap', might help here. This example isn't exactly what you're describing, but I think the same principle could be applied. I just tested this script in a "LittleArrows" style scrollbar, and it successfully does an endless loop through the numbers 1 through 12, both backward and forward, when you click the increment or decrement arrows. 

Now imagine lines of text stored in a variable that would be shown in the field, instead of the numbers.

local sCount

on scrollbarLineInc
    put 1,2,3,4,5,6,7,8,9,10,11,12 into tnums
    add 1 to sCount
    put sCount wrap 12 into fld "counter"
end scrollbarLineInc
    
on scrollbarLineDec
    put 12,11,10,9,8,7,6,5,4,3,2,1 into tnums
    subtract 1 from sCount
    if sCount is 0 then put 12 into sCount
    put sCount wrap 12 into fld "counter"
end scrollbarLineDec

HTH,

Devin

Devin Asay
Humanities Technology and Research Support Center
Brigham Young University




More information about the use-livecode mailing list