Debugging DataGrid script

Sarah Reichelt sarah.reichelt at gmail.com
Mon Jun 22 17:58:18 EDT 2009


> I'm trying to debug a script that populates the dgText of a DataGrid, but
> can't find the cause of the problem.
>
snip

I think this line is incorrect for at least one & possibly 2 reasons.

>   set the dgText [firstLineContainsHeaders] of grp "HelpDataGrid" of card
> "Help" to tHelpLines

Firstly, the "firstLineContainsHeaders" needs to be in quotes.
Secondly, I'm not sure if you can leave a space before the opening
square bracket.

So try this:

set the dgText["firstLineContainsHeaders"] of grp "HelpDataGrid" of
card "Help" to tHelpLines

Without knowing exactly how the data grid works, I can't see that it
would be a problem setting the data while on another card. This is
just a standard property setting command which should work fine,
unless there is something in the relevant setProp handler that expects
the grid to be on the current card. If this is the case, you could
lock screen, go to the grid card, populate the grid, then go back to
the original card without any of this having been visible to your
app's users.

Cheers,
Sarah



More information about the use-livecode mailing list