Datagrids and Nested Behaviors

Brian Milby brian at milby7.com
Fri Jul 20 22:28:18 EDT 2018


It is not a bug.  You can't save a behavior on a script only stack, they
much be added after they loaded.  There is a new syntax to make it
automatic, but that wouldn't help here.

In the IDE, enable "Show IDE stacks in lists", open the Project Browser.
Find revdatagridlibrarybehaviorsdatagridbuttonbehavior and notice the extra
number beside it
Open the PI for the stack and go to the advanced tab.
I'm guessing you will see the long ID of the button there.
(Or you could click on the number in the oval and see your script)

On Fri, Jul 20, 2018 at 9:15 PM, Bob Sneidar via use-livecode <
use-livecode at lists.runrev.com> wrote:

> <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.
>
> Bob S
>
>
> > 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:
> >
> > setMainCardBehaviors
> >
> > 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:
> >> http://lists.runrev.com/mailman/listinfo/use-livecode
> >
> >
> > _______________________________________________
> > use-livecode mailing list
> > use-livecode at lists.runrev.com
> > Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> > http://lists.runrev.com/mailman/listinfo/use-livecode
>
>
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
>



More information about the use-livecode mailing list