Re: Set and get dgData and dgText delay

2021-03-30 Thread Sean Cole (Pi) via use-livecode
Hi all, After much fiddling with the code and looking into the depths of LC core code I've found what happens, and it's all to do with message flow. This way works as expected: 1. I create an array from Data 2. Apply data to DataGrid using set dgData 3. Read from data in the same handler or sub

Re: Set and get dgData and dgText delay

2021-03-25 Thread Sean Cole (Pi) via use-livecode
Thanks Bob, but the columns are defined, both in my test stack and the project stack. It gets filled once the scripts have finished running, so it can't be that which is the issue in this instance. But thanks once again for your input. Sean On Thu, 25 Mar 2021 at 17:55, Bob Sneidar via

Re: Set and get dgData and dgText delay

2021-03-25 Thread Bob Sneidar via use-livecode
DGText will only contain data for the columns you have defined in the Datagrid properties. If your dgData array keys have no matching columns it will still populate the dgData but dgText will return empty. This is why I avoid using dgText at all anymore. I have also noticed that if one of the

Re: Set and get dgData and dgText delay

2021-03-25 Thread Sean Cole (Pi) via use-livecode
I’ve tried using wait, wait with messages, wait until. No joy. But in a separate test stack with the same data it works just fine having them one after the other. There is no sense to it NOT passing the text one line to the next. I thought it might be because it was located in a preOpenCard

Re: Set and get dgData and dgText delay

2021-03-25 Thread Richard Gaskin via use-livecode
The difference between the working and non-working examples seems to be limited to the introduction of a delay in the working one, between setting the dgData array and later obtaining its text. Since the array form is what the DG uses internally, perhaps something during loading of that array

Re: Set and get dgData and dgText delay

2021-03-25 Thread Sean Cole (Pi) via use-livecode
Thanks Craig This could make some sense. There are a lot of handlers to deal with. I thought I was going a bit mad. I’m just going to have to pick my way through. On Thu, 25 Mar 2021 at 12:44, Craig Newman via use-livecode < use-livecode@lists.runrev.com> wrote: > I have seen this here and

Re: Set and get dgData and dgText delay

2021-03-25 Thread Craig Newman via use-livecode
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 > wrote:

Set and get dgData and dgText delay

2021-03-24 Thread Pi Digital via use-livecode
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 —