How to master one table field' limits
Andre.Bisseret at inria.fr
Sun Nov 26 11:47:24 CST 2006
Le 26 nov. 06 à 18:01, Eric Chatonet a écrit :
> Bon dimanche André,
> Try: put the text of pFld into tTable :-)
> I have to apologize: probably I made you wasting your time :-(
> I'm really sorry.
> To be frank, when things appear easy and I'm busy, I sometimes
> write directly the code in my email without testing it.
I understand that very well :-)
> I should not. Lesson drawn :-)
Merci beaucoup Éric pour votre réponse.
Don't apologize ! First, I did not waste time ! Thanks to one of your
previous replies (with the "do" solution :-)), I immediately thought
to the possibility of the long name being put instead of content. So
I immediately tried <fld "TheTable"> instead of the long name.
And secondly, remember that I am retired ; I am not in a hurry ;-))
Merci beaucoup pour votre gentillesse :-))
With "the long name of ", <put the text of pFld into tTable> works
> As for your question: I'll be frank once more time:
> This guy wrote obviously this tutorial many months ago and forgot
> it completely...
> He has to dig in to answer you but can't at the moment :-)
> Tomorrow probably.
No problem ; again, it is very kind of you
Best regards from Grenoble
> Best Regards from Paris,
> Eric Chatonet
> Le 26 nov. 06 à 17:42, André.Bisseret a écrit :
>> Le 25 nov. 06 à 12:34, Eric Chatonet a écrit :
>>> 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 ;-)
>> Bonsoir Éric,
>> Thanks to your function, I get the comma delimited list ;
>> but only if I <put FilledLines(fld "TheTable") into
>> tFilledLines> ; Actually if I <put FilledLines(the long name of
>> fld "TheTable>, this long name is put into tTable in the function
>> instead of its content !
>> Still a problem with "do" :-)) ?
>> Well, I am keeping the short name and the function works
>> perfectly ; thanks again.
>> I got another problem with my table fields : I am trying to master
>> the table limits in them. I set xLimit (2) and yLimit (10) and
>> tried to use the rawKeyDown handler from your tutorial.
>> Seems it does not work for me : I mean, the conditon <if "revCell"
>> is in the target> seems to be not true in my table field ;
>> If I state after it, "beep 4" : beep does not occur ;
>> If I state <put "revCell" is in the target>, nothing appears in
>> the message box.
>> I suppose I am doing something wrong, or not doing something I
>> should do ?
>> Best regards from Grenoble
More information about the use-livecode