Possible solution for datagrid library errors
Bob Sneidar
bobs at twft.com
Wed Nov 30 14:51:11 EST 2011
Hi all.
Some people complained before about errors cropping up in the datagrid library. I have found a way to generate an error every time, and it may be related to the errors other people are getting.
I have a datagrid that I use for different table data depending on where I am at. When I initialize that datagrid, I set the columns, the column labels and the column widths. But here's the gotcha. If the datagrid already contains data from a previous operation, and I set the columns using dgProp["columns"] then I will throw an error every time, I presume because the existing array does not contain keys for the columns I am setting. I think I can assume this will also be a problem when setting other dgProps that are content dependent.
So the cure for me was to make sure I clear the data from my datagrid before setting any props using dgProp.
Bob
More information about the use-livecode
mailing list