Datagrids and Nested Behaviors
Bob Sneidar
bobsneidar at iotecdigital.com
Thu Jul 19 17:00:41 EDT 2018
Come to think of it, this IS backwards, but it works.
The behavior of group datagrid 1 is by default button id 1005 of stack "revDataGridLibrary"
the behavior of button id 1005 of stack "revDataGridLibrary" is stack "RevDataGridLibraryBehaviorsDataGridButtonBehavior"
so what your statement *should* be doing is setting the behavior of stack "RevDataGridLibraryBehaviorsDataGridButtonBehavior" to a button in another stack! That is WAAAY convoluted, that it actually inserts the behavior at the TOP of the message path.
What I did (which actually makes a LOT more sense) is I set the behavior of the button to the behavior of the datagrid, then I set the behavior of the datagrid to the long id of the button. That broke it.
Bob S
> On Jul 19, 2018, at 13:44 , Bob Sneidar via use-livecode <use-livecode at lists.runrev.com> wrote:
>
> Bernd, you are a genius. I apparently have the heirarchy of behaviors backwards. I would have thought that this would set the behavior of ALL datagrids to include the button script. That of course would be disasterous.
>
> Bob S
>
>
>> set the behavior of the behavior of the behavior of group "datagrid 1" to the long id of button "myButtonName"
>>
>>
>> this will put the "new" behavior at the top of the two behaviors of the datagrid group. Obviously that will not work with editable fields.
>>
>> Kind regards
>> Bernd
More information about the use-livecode
mailing list