Edit cell in basic table field

J. Landman Gay jacque at hyperactivesw.com
Sun Feb 23 14:01:58 EST 2014


On 2/22/14, 9:05 PM, David Epstein wrote:

> Inspecting "the frontscripts", I discovered that the handlers governing
> basic table fields are in the script of button "revTable" of group
> "revLibraries" of stack "revLibrary."
>
> 1.  Hoping to see table-editing in action, I set a checkpoint at the
> beginning of the "on mouseUp" handler in that script.  But clicking the
> field did not cause execution to halt or the debugger to open.  Are
> LiveCode's own frontscripts not debuggable by the user?

To prevent interference, normally rev stacks don't respond to debugging. 
You can change that behavior by setting the global gRevDevelopment to 
true. You should see it listed in the global variables pane of the 
message box if the checkbox for Rev UI variables is selected.

>
> 2.  It looks like if I am willing to edit LiveCode's own frontscript, I
> can get the information I want.  When I insert this statement
> send "cellWasEdited pObject,txCell,tyCell,tNewText" to pObject
> into the frontscript's "revWriteCellField" handler, I can handle a
> "cellWasEdited" message in my table field's script.
>
> Doing this would mean my stack would not work on someone else's
> machine.  I also wonder whether fiddling with LiveCode's scripts is
> hazardous, or if there are better ways of doing this.  (I tried
> inserting my own closeField handler in front, and having it pass
> closeField on to LC's frontscript.  This did not work.  And some of the
> useful information is stored as script local variables by LC's
> frontscript, which doesn't give me access to it in my own script.)

You'll probably not want to change the debugging state on someone else's 
machine. All kinds of havoc can result if the user doesn't expect it. 
Actually, you should only change it yourself while you're actively 
working on the rev script, then set it back when you're done.

But once you have things the way you want them, you can just put a copy 
of that button into your own stack and insert its script into the front. 
There's nothing special about it, it's just a library.


-- 
Jacqueline Landman Gay         |     jacque at hyperactivesw.com
HyperActive Software           |     http://www.hyperactivesw.com




More information about the use-livecode mailing list