detecting cell movement in a table

Peter Haworth pete at lcsql.com
Sat Jun 27 19:00:22 EDT 2015


Sounds like Livecode tables are not very useful unless all you are doing is
displaying data.

I'm going to assume that when the user edits a cell, the text property of
the table is updated with the new value.  If so, you should be able to
store the original contents of the table and compare the new contents with
the old to see if anything changed, then go through line by line and column
by column to figure out what exactly changed.  Pretty messy.  And it still
doesn't solve the issue of when you would need to do that since there
apparently isn't a message that is reliably sent.

Maybe a keydown handler for the table which sets a "dirty" flag for the
table and then use the flag setting to trigger a compare of the old and new
table contents at some point during processing?

I'm a big fan of Bernd's modTableField and it lets you know when a cell has
been edited, but there is a learning curve associated with using it, as
with any custom control.

On Sat, Jun 27, 2015 at 3:34 PM Dr. Hawkins <dochawk at gmail.com> wrote:

> On Sat, Jun 27, 2015 at 1:03 PM, Dr. Hawkins <dochawk at gmail.com> wrote:
>
> > I'm managing to catch this one, and do some updating.   Now I have to
> > intercept tab, etc.
> > to do sane navigations . . .   a simple regal was able to change each of
> > these into a handler with 4 variables, a breakpoint, and a pass . . . but
> > none seem to fire as I maneuver around it (they *would* reach the group
> > holding the table, wouldn't they?
> >
>
> but it seems to be catch-as-catch-can as to whether it works or not.
>
> I have handlers in the group that sometimes trigger on the
> revUpDateCellValue, but none of the other handles ever trigger.  I have
> handlers like
>
> on revWhatever a,b,c,d
>
> ck a & cr & b & cr & c & cr & d
>
> breakpoint
>
> pass revWhatever
>
> end revWhatever
>
>
>
> none of these trigger as I move about and edit.  I put them in both the
> table script and the group script.
>
> sometimes revCellUpdate is called when a cell changes, and other times not.
>
>
> --
> Dr. Richard E. Hawkins, Esq.
> (702) 508-8462
> _______________________________________________
> 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