clearing table fields ?

Wilhelm Sanke sanke at hrz.uni-kassel.de
Mon Sep 13 15:51:07 EDT 2004


On Mon Sep 13, jbv jbv.silences at Club-Internet.fr wrote:

> I'm trying to clear the content of some table fields
> using revEmptyTable, but it doesn't seem to work
> for all table fields on the card...
> for instance I have 3 table fields, but it works only
> for the first 2, and not for the 3rd...
> is any special setting (locktext, whatever) required
> in order to use the handlers from the revTable
> frontscript ?
>
> Thanks,
> JB



Try this, this is the slightly modified contents of the "revEmptyTable" 
handler in button "revTable" of stack "revlibrary", which I put into a 
button beneath the table field - it safely clears all cells:

"on mouseUp
   put the name of fld "Table Field" into pObject
   put the long id of pObject into tObject
   if (word 1 of tObject is "field") and (the cREVGeneral["table"] of 
tObject is true) and (exists(tObject)) then
     set the text of tObject to empty
     set the cREVTable["currentview"] of tObject to empty
     set the cREVtable["returnedview"] of tObject to empty
   end if
 end mouseUp"

By the way, the Transcript Dictionary does not mention "revEmptyTable".

Regards,

Wilhelm Sanke
<http://www.sanke.org>




More information about the use-livecode mailing list