Table Field Docs?

Stephen Barncard stephenREVOLUTION at barncard.com
Tue May 10 13:51:27 EDT 2005


Peter, I agree with you about the weirdness of the table fields. 
There seems to be 'data behind data' and it's frustrating to work 
with. One can set one cell at a time, but how do we load all the 
cells at once? Putting a tab/return delimited text string in there 
goes into another dimension.



At 5:42 PM +0100 5/10/05, Peter Reid wrote:
>Hi Frank
>
>Thanks for the response.  Unfortunately your recommendations only 
>work for ordinary fields not table ones.  The problem is that when 
>you start editing into cells, the field text property is clearly NOT 
>being used to hold the edited cells.  From other messages on the 
>list it seems that hidden data structures are used for this.
>
>This is why I'm after some documentation - how to I get at the 
>hidden data structure to read/write/empty under script control?
>
>>put tableContent into field "Table Field"     -- put data into complete table
>>put field "Table Field" into tableContent     -- get complete table data
>>
>>>- clear a table
>>
>>put empty into field "Table Field"
>>
>>>- address individual cells for reading/writing
>>
>>set the itemDelimiter to tab                                   -- 
>>the lines in a table field have the columns separated by tabs
>>
>>put 6 into item 5 of line 7 of field "Table Field"   -- row 7, column 5
>>put item 3 of line 2 of field "Table Field" into mycell   -- row 2, column 3
>>
>>>- fix the number of columns when tabbing across
>>
>>not sure what you mean by this one?
>>
>>>- have table column headings that scroll as the data table scrolls
>>
>>Hmm, you could put the headings in another table immediately above 
>>the one they belong to, set the tabStops the same, eliminate the 
>>scrollbars, make it non-editable, and put a bit of code in the main 
>>field ("Table Field") to keep the horizontal scrolling in sync.  I 
>>did something like this with an experimental stack I had started at 
>>one point.
>>
>>Then you could format the other table field however you want.
>
>Yep, I've done this use-another-table-for-the-headings trick but 
>it's clunky and I hoped that a "spreadsheet like" object might 
>actually support proper column headings?!
>
>Cheers
>
>Peter
>--
>Peter Reid
>Reid-IT Limited, Loughborough, Leics., UK
>Tel: +44 (0)1509 268843 Fax: +44 (0)8700 527576
>E-mail: preid at reidit.co.uk
>         preid at reidit.demon.co.uk
>Web: http://www.reidit.co.uk
>      http://www.reidit.demon.co.uk
>_______________________________________________
>use-revolution mailing list
>use-revolution at lists.runrev.com
>http://lists.runrev.com/mailman/listinfo/use-revolution



More information about the Use-livecode mailing list