Datagrids and Nested Behaviors
bobsneidar at iotecdigital.com
Sat Jul 21 04:15:34 CEST 2018
<Sigh> belay all that. Apparently I have to get the behavior of the behavior of the ehavior of the datagrid. THAT seems to correctly return the id of the custom button. But the datagrids do not seem to work after a close and reopen of the stack, unless I use this workaround. So there is still something wrong with the nested behavior of a datagrid.
> On Jul 20, 2018, at 19:05 , Bob Sneidar via use-livecode <use-livecode at lists.runrev.com> wrote:
> Okay my workaround is to have a custom property with the name of all the datagrids on a card in a custom property. Then in the openStack handler of the card I have:
> In the same script I have:
> on setMainCardBehaviors
> put the long id of me into tParentCard
> put the gridnames of this card into tGridList
> repeat for each item tGridName in tGridList
> if not there is a group tGridName of tParentCard then next repeat
> put the long id of group tGridName of tParentCard into tGridID
> set the behavior of the behavior of the behavior of tGridID \
> to the long id of button "maingrids" of card "Behaviors" of this stack
> end repeat
> end setMainCardBehaviors
> Essentially I have to set the custom behavior of every grid on a card the first time I open it. I think this is a bug, but it may be the intended behavior. Only the LC overseers can answer that.
> Bob S
>> On Jul 20, 2018, at 18:41 , Bob Sneidar via use-livecode <use-livecode at lists.runrev.com> wrote:
>> OKAY HUGE BUG ALERT!!!
>> It seems that even though I save the stack after setting this behavior, Livecode RESETS THE DATAGRID BEHAVIOR TO THE DEFAULT!!!!!
>> What the EFF? Of course I can get around it with a custom openCard handler that resets them, (and in the words of Malthesar when discovering that the Historical Records they have based their entire civilization on were all lies), but WHYYYYY?
>> Bob S
>> use-livecode mailing list
>> use-livecode at lists.runrev.com
>> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
More information about the use-livecode