Datagrids and Nested Behaviors
bobsneidar at iotecdigital.com
Sat Jul 21 01:34:34 CEST 2018
> On Jul 20, 2018, at 15:31 , Richard Gaskin via use-livecode <use-livecode at lists.runrev.com> wrote:
> IIRC Bernd's suggestion was for global scope only, yes? That is, it swaps the positions of the two bottom scripts shown below, and affects all DGs running in the session.
Actually no that is why I was saying the syntax was the complete opposite of what you'd expect. Bernd's solution actually produces the results you see in your diagram. The custom behavior is inserted between the datagrid and the default behavior. Odd, huh? But I've spent the better part of the afternoon updating each datagrid in my main form to use a one custom behavior with code common to each, while still preserving the default datagrid behavior. And, until I do that for each datagrid, it's own handlers are still in effect. I tested that by putting a breakpoint at the beginning of each selectionChanged handler, the behavior and the grid. Until I "inserted" the custom behavior, the datagrid verson of selectionChanged is what triggered.
> I can't think of another way to do it, but it would be nice to be able to overload some DGs while leaving others alone.
See above. :-)
More information about the use-livecode