Datagrid stopper out of the gate

zryip theSlug zryip.theslug at gmail.com
Mon Jul 19 07:18:31 CDT 2010


On Mon, Jul 19, 2010 at 1:37 PM, Jim Ault <jimaultwins at yahoo.com> wrote:
> When I use
>>
>>
>> put false into keyy
>> set the dgText[keyy] of  group "postTimeDgrd" to IT
>
> the header labels in line 1 become the first row of data
> and the rest of the data fills in all of the columns.
>
> and by making one change... false to true
>>
>> put true into keyy
>> set the dgText[keyy] of  group "postTimeDgrd" to IT
>
> the grid only has data in the first column
> as if the only column header that matched was the first one.
>
> So let's say I did not use the correct spelling for column 2 "Race"
> wouldn't the default be for new columns to be created to accommodate?
>

You are correct. If for example, your header is
Post      Race      Track      City      State

And the first header line of your data is:
Post      Race2      Track      City2      State

Col 1, 3 and 5 will be filled with datas and col 2 and 4 will remain empty.


> I found MY scripting problem.
> The header was written as follows:
>
> put "Post, Race, Track, City, State" into hdr
> replace comma with tab in hdr
> -- thus col 2-5 had a leading space which was invisible, just as the tab
> char is.
>
>
> Correct data casting is
> put "Post,Race,Track,City,State" into hdr
> replace comma with tab in hdr
>
> Discovery
> Column naming is white space sensitive.

Ok, great.
Consider name of column as unique identifier. Columns and first line
of data must match perfectly when using the dgText[true] property


Regards,
-- 
-Zryip TheSlug- wish you the best! 8)
http://www.aslugontheroad.co.cc



More information about the use-livecode mailing list