Nested Data Grid Behaviors

LiveCode is the premier environment for creating multi-platform solutions for all major operating systems - Windows, Mac OS X, Linux, the Web, Server environments and Mobile platforms. Brand new to LiveCode? Welcome!

Moderators: heatherlaine, Klaus, FourthWorld, robinmiller, kevinmiller

Post Reply
bwmilby
Posts: 170
Joined: Wed Jun 07, 2017 5:37 am
Location: New Orleans, LA
Contact:

Nested Data Grid Behaviors

Post by bwmilby » Mon Jul 30, 2018 4:13 am

We had a thread going on the Use List about how to get a behavior between the Data Grid group and the DG library. It turns out that the way the library code was written, attempting to do this broke the Data Grid. A bug report was submitted and a fix has been proposed. This is great for those of us who are on LC9, but won't help anyone using LC8 if they would like this behavior. I've posted a demo stack on GitHub that shows you how to do this on either version (and it may work on earlier versions too).

Why? If you wanted to use a behavior to replace or add to an existing DG handler, you would not be able to without this mod. You could always put the code in the DG group itself, but then you would need to duplicate it for each DG that you wanted to use the same code. You could chain it to the end (after the library code), but then it would impact every DG in the app (which may or may not be an issue).

https://github.com/bwmilby/lc-misc/tree ... DGBehavior

Image

The README on GitHub also links to the discussion thread, the PR, and the bug report.
Brian Milby

Script Tracker https://github.com/bwmilby/lc-misc/tree/master/ScriptTracker

Post Reply

Return to “Getting Started with LiveCode - Experienced Developers”