Getting current line number of a table field.
Mike Bonner
bonnmike at gmail.com
Wed Feb 14 11:04:18 EST 2018
Try this...
on rawkeyup pkey
send "getline" to me in 10 millisec
pass rawkeyup
end rawkeyup
command getline
put the short name of the focusedobject
end getline
This gives you the name of the editing field that appears for each cell in
the form of:
revCell-2,2
Parse that and voila, you have your info.
On Wed, Feb 14, 2018 at 8:35 AM, dunbarx via use-livecode <
use-livecode at lists.runrev.com> wrote:
> 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
> work.
>
> Is it that in a table field, if only one "cell" is selected, the
> selectedLine just does not compute?
>
> Craig Newman
>
>
>
>
>
>
> --
> Sent from: http://runtime-revolution.278305.n4.nabble.com/
> Revolution-User-f278306.html
>
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
>
More information about the use-livecode
mailing list