In a table field, cells getting "not empty" while no text in them

Eric Chatonet eric.chatonet at
Sat Nov 25 06:34:28 EST 2006

Bonjour André,

That's normal behavior since when you click in cell 3 of line 4  
without typing anything, line 4 will contain 2 tabs :-)
So use a tiny function:

function FilledLines pFld
   local tTable, tList
   put pFld into tTable
   replace tab with empty into tTable
   repeat with i = 1 to the number of lines of tTable
   if line i of tTable <> empty then put i & comma after tList
   end repeat
   delete char -1 of tList
   return tList
end FilledLines


put FilledLines(the long name of fld "TheTable") into tFilledLines

You'll get a comma delimited list like "1,3,8,9": the number of the  
lines that are not empty as you wished it.
Note that I use the long name of fld "TheTable" as param: it's more  
secure and allows to write directly: put pFld into tTable (without  
using do this time ;-)

Best Regards from Paris,
Eric Chatonet

Le 25 nov. 06 à 12:16, André.Bisseret a écrit :

> Hi,
> On one card, I have several fields where the users will write  
> textual data.
> a
> For each field, I need to check for each line if it is empty or not.
> (I would like that, if a line is not empty then a small check box   
> be shown so that the user could check it ; then the checked lines  
> would be copied and then pasted elsewhere as a whole. )
> One of the fields is a normal field ; all is working well with it.
> But another field is a  table field (say, "theTable") with two  
> editable columns and 9 editable lines.
> Now,
> First, I put empty into field theTable
> Then, if I write something only in the top-left cell
> when I test the lines, I get :
> - line 1 not empty as expected;
> - lines 2, 3 and 4 are empty as expected;
> but, it happens that lines 5, 6,7,8 and 9 are not empty (seems they  
> contains  one tab space).
> Well, before sending this message, this time I did not forget to  
> read again the tutorial from Éric Chatonet on "How to manage table  
> fields". Thanks to it,  I used the "clearTable pFieldName" handler  
> (instead of only putting empty into the field°
> But this does not solve my problem.
> Again, if I select some cells in the field (even if I dont write  
> anything), lines  are becoming "not empty" (seems it is randomly).  
> So that check boxes appear for lines in which there are no text;  
> but something anyway :-((
> It seems that some lines get "something" in them, not only while  
> nothing has been written in them, but even while they have'nt been  
> selected.
> So the only solution I think about now, is to keep visible all  
> check boxes of all lines of the field, even if they dont contain  
> any text. But of course, it is not so good from an ergonomic point  
> of view.
> Is there a way to figure out this issue ?
> Thanks for any help
> Best regards from Grenoble
> André

----------------------    eric.chatonet at

More information about the Use-livecode mailing list