Datagrid blessing or nightmare

If you find an issue in LiveCode but are having difficulty pinning down a reliable recipe or want to sanity-check your findings with others, this is the place.

Please have one thread per issue, and try to summarize the issue concisely in the thread title so others can find related issues here.

Moderators: Klaus, FourthWorld, heatherlaine, kevinmiller, robinmiller

bogs
Posts: 4790
Joined: Sat Feb 25, 2017 10:45 pm

Re: Datagrid blessing or nightmare

Post by bogs » Fri Jul 27, 2018 9:17 pm

Nice, I think the one Mikey posted is newer than the link I sent you. Good deal Mikey!
Image

SparkOut
Posts: 2292
Joined: Sun Sep 23, 2007 4:58 pm

Re: Datagrid blessing or nightmare

Post by SparkOut » Fri Jul 27, 2018 9:21 pm

As one lucky enough to be around for datagrid beta, and have been honoured to provide feedback even before Runrev/LiveCode licensed it, as well as somewhat biased of the opinion everything Trevor writes is gold (also Malte) I feel there is almost a choice, learn a (somewhat involved) api or roll your own. If you are happy and confident to roll your own then great, otherwise ok, it's not trivial, but the dg is an amazing tool. I especially find the form view most useful. If you can't just set the dgText or dgData of a table view then I pretty much leave it, but that's a reflection of my data requirements not the usability.

What I take from this subjective feedback is that datagrids are daunting to newcomers but offer a superb way of presenting data, without having to create the universe first. If you can create your own mini-universe then you can do without the multiverse api. Otherwise learning the multiverse api is easier than creating the universe first. (Apologies to the memory of Carl Sagan.)

bogs
Posts: 4790
Joined: Sat Feb 25, 2017 10:45 pm

Re: Datagrid blessing or nightmare

Post by bogs » Fri Jul 27, 2018 9:41 pm

Mind you, I want to make it clear that -
..a.) I don't consider the dg a minor thing easily knocked together in an afternoon
..b.) I don't consider it ineffectual for its intended use
..c.) I certainly don't consider tackling the problem it solves a walk in the park task in concept, coding, or execution
..d.) I definitely don't want to make it sound like I am casting aspersions on someone else's good thinking or good development work.

As far as the learning of it goes, therein lies the rub, and when you say "daunting to newcomers", keep in mind there are a lot of users who have been around a LOT longer than I that still mention having difficulty coming to terms with it. I am certainly not the brightest bulb in the pack, but 2 months of having a go with it was enough for me to throw in the towel, and I (usually) don't quit easily when I'm trying to figure something out. Maybe I just have a mental block for it, I dunno.

Is it worth 2 months of working to try and figure it out? Sure, if you are going to need or ever use the firepower it has available to it. I may even spend another 2 months looking at it in the future sometime, just because :wink:
Image

Mikey
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 727
Joined: Fri Jun 27, 2008 9:00 pm

Re: Datagrid blessing or nightmare

Post by Mikey » Fri Jul 27, 2018 9:42 pm

Yes, that's a newer version of MTF. Bernd has been working on it to make it work better for mobile. There are some issues with it (which may be LC bugs), but he's still working on it.

I love both the DG and MTF. DG is more of a luxury ride, and MTF is more of a sports car, so I tend to use the DG for general purpose development, and switch to the MTF when I have something that makes the DG slow to respond either to scrolling or to taps.

Mikey
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 727
Joined: Fri Jun 27, 2008 9:00 pm

Re: Datagrid blessing or nightmare

Post by Mikey » Fri Jul 27, 2018 9:44 pm

Hey bogs, tell me more about struggling with learning the DG. I did a beginner session during this month's LCG that included using a DG, and thought that in the short time I spent covering using a DG I would have gotten someone to the point that the could use it effectively.

sphere
Posts: 1087
Joined: Sat Sep 27, 2014 10:32 am
Location: Earth, Except when i Jump

Re: Datagrid blessing or nightmare

Post by sphere » Fri Jul 27, 2018 9:57 pm

I hope Bernd will let me know if he doesn't want me to share this publicly, but for now, I've sent you a pm with a link to it.
Muchos Gracias Bogs and Mikey!

bogs
Posts: 4790
Joined: Sat Feb 25, 2017 10:45 pm

Re: Datagrid blessing or nightmare

Post by bogs » Fri Jul 27, 2018 10:26 pm

Mikey wrote:
Fri Jul 27, 2018 9:44 pm
tell me more about struggling with learning the DG
It will take me a while to compose that time period (about 9 months ago) into a coherent chain of events, but I'll certainly try to come up with something for you if you really want it, then pm it to you.

I have no doubt that the lesson you delivered wasn't anywhere near as disjointed as the way I went about digging into it, so I doubt it will be of much value to you.

There is, as I am sure you know, quite a difference between going over written material scattered here and there as compared to having someone (and only one someone's point of view on the topic) presented to you in a well ordered / structured lesson :wink:
Image

Mikey
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 727
Joined: Fri Jun 27, 2008 9:00 pm

Re: Datagrid blessing or nightmare

Post by Mikey » Fri Jul 27, 2018 11:16 pm

What it might do is help build a better beginner guide for presenting data in LC.

bogs
Posts: 4790
Joined: Sat Feb 25, 2017 10:45 pm

Re: Datagrid blessing or nightmare

Post by bogs » Sat Jul 28, 2018 12:09 am

Always a noble goal :mrgreen:
Image

Simon Knight
Posts: 608
Joined: Wed Nov 04, 2009 11:41 am
Location: Gunthorpe, North Lincs, UK

Re: Datagrid blessing or nightmare

Post by Simon Knight » Mon Sep 07, 2020 10:48 am

I'm sure if bumping old threads is poor form but here goes.

I have just tried the new DG2 for the first time having previously used DG1 on odd occasions. My issues with version 1 is their complexity seems to defeat LC at times especially when you start using your own behavior button code to customise the Datagrid. Frequently I would find myself in the situation where a minor script error made under the hood would cause what I have previously called a silent failure. These are where the LC engine just seems to die without posting any errors. This usually means that LC v7/v8 needs to be restarted and the most recent code changes examined very carefully. Also I think I had times when the allocation of behaviors became confused between several datagrids but this is very hard to confirm.

Yesterday I used a DG2 form to display image thumbnails which was quite simple to implement. However, when I tested it the datagrid it would not scroll: the scroll bar moved but that was all that moved. I re-read the docs - nothing! So I searched this forum and, youv'e guessed it, the solution was to quit LC and restart. Following the restart the datagrid started scrolling which is good but what was happening to the scroll messages before the restart? Like I said complex beasts.

So I am in the camp of using them only if there is no alternative. I would also recommend Bernd's modTableField and also Scott Rossi's use of the table field http://tactilemedia.com/blog/2015/11/07/table-lab/

best wishes
Simon
best wishes
Skids

Post Reply

Return to “Bug Triage”