scrolling to a line

MisterX b.xavier at internet.lu
Sun Nov 13 15:03:17 EST 2005


> > I've modified Xavier's modification of my modification of
> > (somebody's??) code to search incrementally in a sorted list field. 

that was original code - not to boast but to say why there wasn't no
arrowkey handling in it before. I also have on arrowkey handlers so I don’t
have
to handle those. Same on altkeyup with page up or down, control arrowkeys, 
etc... ;)

Depends how you set up the params of your field maybe...

--

Here's a few more cool functions which windows implements which are not 
impractical when the case applies...

If I keep pressing the same letter (since the start of filling the word), 
the line keeps going down until it reaches the last occurrence of the lines
starting with that letter, then it starts back at the first line.

The second one, if applicable, it jumps to the line starting with the next
best 
choice before the missing line... That way you see it's missing.

Beeping is annoying... I'd rather have the hilite flash or something
quiet...

But good suggestions. I'll see what comes up next time I touch it up ;)

But bring on any solution you may have...

Is 3 seconds too much? Should the lastuserkeys should be wiped if we press
deletekey or esc?

cheers
Xavier
http://monsieurx.com
 

> -----Original Message-----
> From: use-revolution-bounces at lists.runrev.com 
> [mailto:use-revolution-bounces at lists.runrev.com] On Behalf Of 
> J. Landman Gay
> Sent: Sunday, November 13, 2005 20:00
> To: How to use Revolution
> Subject: Re: scrolling to a line
> 
> Charles Hartman wrote:
> > I've modified Xavier's modification of my modification of
> > (somebody's??) code to search incrementally in a sorted list field. 
> 
> Could it have been the one I posted about two years ago? I 
> sent this to the list:
> 
> 
> local lUserKeys, lOldTicks
> on keyDown  whichKey -- select from keyboard
>    -- J. Landman Gay, 1990, modified for Revolution: 2003
>    if (the selectedField is not "") or (charToNum(whichKey) 
> is among the 
> items of "28,29,30,31") -- arrow keys
>    then pass keyDown
>    if the ticks - lOldTicks > 60 then put "" into lUserKeys
>    put whichKey after lUserKeys
>    put return & fld "myField" & return into tListText
>    get lineoffset(cr&lUserKeys,tListText)
>    if it > 0 then set the hilitedline of fld "myField" to it
>    put the ticks into lOldTicks
> end keyDown
> 
> > But it doesn't solve one problem: suppose the user starts typing a
>  > string that doesn't appear in the list?
> 
> The easiest thing would be to just add a beep in this case, but if I 
> have time today I'll see if I can rewrite it to accomodate.
> 
> -- 
> Jacqueline Landman Gay         |     jacque at hyperactivesw.com
> HyperActive Software           |     http://www.hyperactivesw.com
> _______________________________________________
> use-revolution mailing list
> use-revolution at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage 
> your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-revolution




More information about the use-livecode mailing list