scrolling to a line

J. Landman Gay jacque at hyperactivesw.com
Sun Nov 13 13:59:37 EST 2005


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



More information about the use-livecode mailing list