Getting current line number of a table field.

dunbarx dunbarx at
Wed Feb 14 10:35:16 EST 2018

You know, this proved more of a problem than I thought.

Richmond, the issue is with tab and return keyPresses, not mouse clicks.
Anyway, given a table field 1 and another field 2, this works if you tab or
return in the table field:

on rawKeyUp tKey
   put the selectedLoc && the selectedChunk into fld 2
   pass rawKeyUp
end rawKeyUp

And this works fine in a button:

on mouseUp
   set the itemDel to tab
   select item 2 of line 2 of fld 1
   answer the selectedLine of fld 1
end mouseUp

But this does not in the table field:
on rawKeyDown tKey
   put "" into fld 2
   put the selectedLine into fld 2
   pass rawKeyDown
end rawKeyDown

I always get "line 1 of field 3"  (!!!!)

 Kluge city to get the line from the selectedLoc, but that would indeed

Is it that in a table field, if only one "cell" is selected, the
selectedLine just does not compute?

Craig Newman

Sent from:

More information about the Use-livecode mailing list