Re: DataGrid Crash to Desktop Revisited

2019-12-19 Thread Tom Glod via use-livecode
Np, if you've tried my toolbox, I've been to hell and back with the datagrid, and made every error imaginable...including this one. There is still one that I need to try to replicate ...because the result was bonkers. On Thu, Dec 19, 2019 at 4:57 PM Bob Sneidar via use-livecode <

Re: DataGrid Crash to Desktop Revisited

2019-12-19 Thread Bob Sneidar via use-livecode
Thanks for the confirmation Tom. Bob S > On Dec 19, 2019, at 12:17 , Tom Glod via use-livecode > wrote: > > Hey Bob > > When you set the data of a grid, the selection IS changed to empty. thats > all you need to know. triggering another handler in this is the correct > way to do

Re: DataGrid Crash to Desktop Revisited

2019-12-19 Thread Tom Glod via use-livecode
Hey Bob When you set the data of a grid, the selection IS changed to empty. thats all you need to know. triggering another handler in this is the correct way to do it. On Thu, Dec 19, 2019 at 10:48 AM Bob Sneidar via use-livecode < use-livecode@lists.runrev.com> wrote: > Yeah tried

Re: DataGrid Crash to Desktop Revisited

2019-12-19 Thread Bob Sneidar via use-livecode
Yeah tried that. Data doesn't get set. My problem is that I have been using SelectionChanged to do a lot of things, like populate the card objects (I call it a form). I was thinking that there might be some way to discern that an existing SelectionChaged handler was in effect in the datagrid

Re: DataGrid Crash to Desktop Revisited

2019-12-18 Thread Mark Wieder via use-livecode
On 12/18/19 4:30 PM, Bob Sneidar via use-livecode wrote: I'm not sure why this is, but I think it's because the datagrid library does something internernally that triggers another selectionChanged, causing an infiinite loop, forcing the engine to bail out. Yes, that's what I would expect.

Re: DataGrid Crash to Desktop Revisited

2019-12-18 Thread Bob Sneidar via use-livecode
This is likely the culprit in the datagrid library. There are a number of places where it is called: private command _SelectionChanged pPreviouslyHilitedIndexes dispatch "selectionChanged" with sHilitedIndexes, pPreviouslyHilitedIndexes end _SelectionChanged I think what is needed is a way

DataGrid Crash to Desktop Revisited

2019-12-18 Thread Bob Sneidar via use-livecode
Hi all. I have isolated the issue I presented some time ago, where selecting a record in a datagrid crashed Livecode to desktop. It can be reproduced easily enough. Create a stack with a single datagrid, add 2 records. In the script of the datagrid have a selectionChanged handler like so: