tableField . . . refering to columns

Mike Bonner bonnmike at gmail.com
Thu Nov 3 17:28:56 EDT 2016


The why has been covered.. no "column" delimiter, and the fact that.. if it
were to actually work, putting item 1 of your sample data into item 1 of
the field should put the item separated by the specified item delimiter..
so there would be no change. (unless as above you use 2 delimiters

Meaning if you did this..

put "1^2^3^4" into tdata
set the itemdel to "^"
repeat with i = 1 to the number of items in tdata
put item i of tdata into item i of tdata
end repeat
put tdata

You get out exactly what you put in.  1^2^3^4

Its interesting to me that the itemdel can't be changed on the fly to do
this..  Well, it will but you have to have 2 separate containers because
the number of items fluctuates based on chosen delimiter as things are
processed. The following works..

put "1^2^3^4" into tdata
set the itemdel to "^"
repeat with i = 1 to the number of items in tdata
   put item i of tdata into tTempitem
   set the itemdel to tab
   put tTempitem into item i of tdata2 -- separate container, separate item
counts
   set the itemdel to "^"
end repeat
put tdata2

But it still begs the question why one wouldn't just-- replace "^" with tab
in field "whatever"

On Thu, Nov 3, 2016 at 2:43 PM, Bob Sneidar <bobsneidar at iotecdigital.com>
wrote:

> Oh crap yeah I don't think a field has a "column" property. Boy it would
> be nice if it did!
>
> Bob S
>
>
> On Nov 3, 2016, at 13:14 , Randy Hengst <iowahengst at mac.com<mailto:iow
> ahengst at mac.com>> wrote:
>
>  put item 1 of PREE1 into column 1 of line 1 of fld "fTF"
> end mouseUp
>
> line 1 if fld "fPRE" contains this "2^45^9^1113"
>
> I wonder why this throws a "bluey":
>
> button "Button": compilation error at line 4 (Handler: bad command) near
> "1", char 30
>
> OR . . . to put things another way: How does one refer to columns in a
> tableField?
>
> Richmond.
>
> _______________________________________________
> 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