Set and get dgData and dgText delay

Pi Digital sean at pidigital.co.uk
Wed Mar 24 17:09:03 EDT 2021


Hi All

This has been a bit of a mind bender, mainly because in a test stack it works just fine, but...

Has anyone ever had problems with something like this:

on myHandle
— ...some code
Set the dgData of grp “myDG” to tDataA
Put the dgText of grp “myDG” into tDataS
— tDataS returns empty
— process tDataS...
end myHandle

And this:

on myHandle
— ...some code
Set the dgData of grp “myDG” to tDataA
dispatch “myHandlePt2”
end myHandle

on myHandlePt2
Put the dgText of grp “myDG” into tDataS
— tDataS returns empty
— process tDataS...
end myHandlePt2

However, this works:

on myHandle
— ...some code
Set the dgData of grp “myDG” to tDataA
send “myHandlePt2” to me in 0 sec
end myHandle

on myHandlePt2
Put the dgText of grp “myDG” into tDataS
— tDataS returns empty
— process tDataS...
end myHandlePt2


It seemingly doesn’t have anything to do with data length. I’ve tried forcing a refresh of the grid using dispatch refreshList to it but that makes no difference. Stepping through in the debugger allows it to work or setting a breakpoint, but does not when in full run. Both in standalone and ide. 

A one have any clues why this might not work sometimes?

Thanks

Sean Cole
Pi Digital
eMail Ts & Cs




More information about the use-livecode mailing list