Debugging DataGrid script

mfstuart mfstuart at cox.net
Mon Jun 22 17:50:30 EDT 2009


I just tried populating the DataGrid from the Message Box while the current
card was card "Help".
Result: the DataGrid was populated.
But issuing the script from the Message Box while the card "Help" was not
focused (from a different card), returned an error message: no such object.

So I guess the question is: can you populate a DataGrid on a card while not
on that card? Doesn't seem to work for me.

Anybody got a work around for this?

Regards,
Mark Stuart



mfstuart wrote:
> 
> 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-tp24155940p24156148.html
Sent from the Revolution - User mailing list archive at Nabble.com.




More information about the use-livecode mailing list