dgText [true] question?
Trevor DeVore
lists at mangomultimedia.com
Tue May 5 08:24:12 EDT 2009
On May 4, 2009, at 2:30 PM, Jim Lambert wrote:
> This script from tutorial "3389-How-Do-I-Populate-a-Data-Grid-With-
> Data-" just doesn't work for me.
> answer file "Select iTunes text file:"
> put it into theFile
> put true into firstLineContainsHeaders
> set the dgText [firstLineContainsHeaders] of group "DataGrid 1" to
> URL ("file:" & it)
>
> ...
>
> I thought the whole idea of 'pFirstLineContainsHeaders' was to
> handle the header row automatically.
> What am I missing?
The data grid will not automatically create columns for you when
pFirstLineContainsHeaders is true. You must first create the columns
yourself by setting the "columns" property. This keeps columns from
being created in your UI when importing data.
When pFirstLineContainsHeaders is false then the data grid will try to
create enough columns to display at least the first row of your data.
I realize this is inconsistent but the "false" behavior was done in
the interest of allowing someone to get some data into the data grid
and displayed relatively quickly using the Property Inspector.
Regards,
--
Trevor DeVore
Blue Mango Learning Systems
ScreenSteps: http://www.screensteps.com
Developer Resources: http://revolution.bluemangolearning.com
More information about the use-livecode
mailing list