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 library, but then what? If I could pull that off, it would have to be in the dgdata custom property before it calls anything that might call selectionChanged. I suspect it would unravel something else though.
What I will do instead is put all the code I need in another handler, and then call that handler in time. That is what I have done with all my other forms, but I thought I would revisit this in the hopes of a more comprehensive solution. Bob S > On Dec 18, 2019, at 17:28 , Mark Wieder via use-livecode > <use-livecode@lists.runrev.com> 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. Selecting different data *should* cause > another selectionChanged event. > >> Any ideas? > > on selectionChanged > put the dgHilitedIndex of me into tHilitedIndex > put the dgDataOfIndex [tHilitedIndex] of me into aDGData [1] > lock messages > set the dgData of me to aDGData > unlock messages > end selectionChanged > > -- > Mark Wieder > ahsoftw...@gmail.com _______________________________________________ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode