Table DataGrid AddData Bug or documentation error?

Klaus on-rev klaus at major.on-rev.com
Wed Nov 14 18:26:44 EST 2012


Hi Bob,

you are a bit late for the party, but welcome :-)

Am 14.11.2012 um 23:08 schrieb Robert Sneidar <slylabs13 at me.com>:

> Couple of things. Did you refresh the datagrid after addData?
> Not sure if you need to, just throwing that out there.
> Also, did you make sure the addData array keys matched the column names
> (NOT the display names but the actual column names)? 

The problem was an unclear documentation in the end!

I supplied a multi dimensional array to the "AddData" command, but this will
only accept a one dimesnional array as parameter, so in the end you can only
add 1 (ONE) record to a datagrid via "AddData".

"AddLine" will in fact accept a mulitlie TAB delimited text and thus add more than
1 record to a datagrid this way, although not by intention but rather by accident!

Neil from support wrote:
...
I have spoken to the Datagrid developer and it would seem that AddData and AddLine 
are only intended to work with a single line.The fact that AddLine works with 
multiple lines is because the internal handler that gets called is used elsewhere 
and supports multiple lines.
...

They will change the documantation to make these fact clear!

And I also filed a feature request to be able to also add more than one record to a
datagrid via "AddData": <http://quality.runrev.com/show_bug.cgi?id=10538>

> Bob

Best

Klaus

--
Klaus Major
http://www.major-k.de
klaus at major.on-rev.com





More information about the use-livecode mailing list