arrowkey and selectionchanged in a list field

Michael Binder runr at prismpole.com
Sat Jun 23 06:53:18 EDT 2007


David wrote:
> I was surprised to discover that the selectedline reported in this
> way seems to lag one behind the actual selected line, and display an
> image adjacent to the correct one.

Eric responded with code:
> on arrowkey pKey
>    if the number of lines of fld <My Field> > 2 then
>      if (pKey = "up" and the hilitedLines of fld <My Field> = 1) then
>        set the hilitedLines of fld <My Field> to the number of lines \
>             of fld <My Field>
>    <snip>

Hi David,
Notice that Eric's code does not use the selectedlines.
I can't quite yet put my finger on it, but I think selectedlines
is buggy and I don't trust it.  I have switched all of my code to
the hilitedlines.

--Michael




More information about the use-livecode mailing list