Tables trouble

Bill Marriott wjm at wjm.org
Sat Mar 10 11:06:52 EST 2007


> There are a lot of bugs in table objects. I'd recommend making your own.

While I agree that table objects are extremely limited, "making your own" is 
non-trivial and not something I would recommend unless you have a decent 
block of time to devote to it. The fact that we've never seen a 100% 
complete implementation of a custom table object from the community speaks 
to the difficulty of doing it. Most people who "roll their own" implement 
only the two or three aspects of a table they "really need" such as 
right-justification of "cells" or resizable columns.

> I figured out I can fill the table with tab delimited lines. So I 
> populated the table with a 'put this into fld "table"' script. But as 
> soon as I edit one of the cells, the entire table content is erased.  From 
> then on, I can add as many cells as I like (manually) without  erasing 
> anything I typed before. But everything I enter using a  script is bound 
> to be erased after the first manual modification. Why?

The answer here is to leave the "table object" check box UNCHECKED and 
simply use the "Vertical Grid" option. The reason why things disappear is 
that the "table object" option is basically causing the field to work a 
little differently than usual, creating a parallel data structure that is 
erased when the table is adjusted later on. There are a whole bunch of 
undocumented commands for working with tables that put things into cells and 
are supposed to handle things like number formatting, etc.

If what you're really trying to do is to line up numbers that you're loading 
via tab-delimited text, the "table object" isn't needed. Just use the 
vertical grid part and values won't disappear on you. 






More information about the use-livecode mailing list