Debugging DataGrid script

mfstuart mfstuart at cox.net
Mon Jun 22 17:36:43 EDT 2009


Hi All,

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

The scripts are run from a button on the "main" card.
The script is reading text that has been loaded with    "put URL... into
tData"

Here's the script that builds each line that is used in the next script:
repeat for each line theLine in tData
 if HelpFound AND theLine begins with "PROP={ID=" & quote & "TEXT" & quote &
",DATA={VAL=" then
    add 1 to tHelpNumber
    put item 4 of theLine into tHelpText
    put tHelpNumber & tab & tHelpName & tab & tHelpType & tab & tHelpText &
cr after tHelpLines
 end if
end repeat

Here's the section of the script that populates the DataGrid:
if tHelpLines is not empty then
   delete last char of tHelpLines
   put false into firstLineContainsHeaders
   --engine stops executing on the next line, so there's a bug in it.
   --the DataGrid is on another card, hence the: of card "Help"
   set the dgText [firstLineContainsHeaders] of grp "HelpDataGrid" of card
"Help" to tHelpLines
   set the disabled of btn "Edit" of card "Help" to false
   set the disabled of btn "Delete" of card "Help" to false
end if

Any help would be appreciated,
Thanx,
Mark Stuart
-- 
View this message in context: http://www.nabble.com/Debugging-DataGrid-script-tp24155940p24155940.html
Sent from the Revolution - User mailing list archive at Nabble.com.




More information about the use-livecode mailing list