Set and get dgData and dgText delay
Craig Newman
craig at starfirelighting.com
Thu Mar 25 08:44:06 EDT 2021
I have seen this here and there for years, and having nothing to do with dataGrids per se.
A handler will fail to run, but will step through in the debugger without issue. This usually resolves, and I never know why.
Craig
> On Mar 24, 2021, at 5:09 PM, Pi Digital via use-livecode <use-livecode at lists.runrev.com> wrote:
>
> 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
>
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
More information about the use-livecode
mailing list