DataGrid2 - What do you like, what don't you like

Anything beyond the basics in using the LiveCode language. Share your handlers, functions and magic here.

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

marksmithhfx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 931
Joined: Thu Nov 13, 2008 6:48 am
Location: London, UK

Re: DataGrid2 - What do you like, what don't you like

Post by marksmithhfx » Sat Aug 28, 2021 11:06 am

stam wrote:
Sat Aug 28, 2021 10:51 am
LiveCode is available, but you have to drill down to user-contributed docsets and you'll find a LiveCode docset maintained by James Hale (Preferences > Downloads > User Contributed in the top left box > scroll down to LiveCode)

Alternatively, you can get more info and the doscset to import directly from James Hale's git repo: https://github.com/jameshale/Dash-User-Contributions
Very helpful, thanks

Mark
macOS 12.6.5 (Monterey), Xcode 14.2, LC 10.0.0, iOS 15.6.1
Targets: Mac, iOS

jameshale
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 474
Joined: Thu Sep 04, 2008 6:23 am
Location: Melbourne Australia

Re: DataGrid2 - What do you like, what don't you like

Post by jameshale » Sun Aug 29, 2021 12:54 am

Re Dash docset:
I think one could request Livecodescript to be an “auto” available docset
IF
the docs were in their own formatted repository.
However the docs for livecode aren’t. They exist in different parts of LC’s repository and are in a custom format. The dictation API’s are a mixture of markdown and a custom format. The parts of the Guide are pdf’s and the extension docs are part of the extension’s code itself.
What you see in Livecode’s dictionary is actually constructed during the build phase from these disparate sources. My dash docset maker stack attempts to do something similar converting these raw files into a dash suitable format (mainly html and pdfs with an sqlite indexing file as required by Dash). Even the LC user guide is constructed during the LC build from the same pdf “fragments” So the mothership would need to do a fair bit of work to change the documentation into something more “dash accessible “ before even requesting inclusion.
BTW, The impetus behind my making the dash docset was the fact that I use a tablet quite a lot and LC’s website did not have a tablet friendly version of their dictionary API. (The javascript behind it didn’t like touch interfaces.) it does now (well done!) but the navigation takes you down one way paths.

stam
Posts: 2679
Joined: Sun Jun 04, 2006 9:39 pm
Location: London, UK

Re: DataGrid2 - What do you like, what don't you like

Post by stam » Sun Aug 29, 2021 1:39 pm

Tbh navigation isn’t the issue.
It’s subsearching complex APIs that is impossible with the current implementation.

What I like about dash is I can a) make it full-screen on a different desktop to LC, so I can swipe between them and more importantly if I search the selected API it will highlight all instances of the search term in the API, which in the case is the data grid is a massive boon.
Not to mention is an order of magnitude faster then either the website or the built in dictionary.

I take onboard what you say about the disparate sources of documentation but am mystified why that’s an issue.

Much as you create a dash docset, LiveCode inc. could do too and upload to whatever repository is required, no?

jameshale
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 474
Joined: Thu Sep 04, 2008 6:23 am
Location: Melbourne Australia

Re: DataGrid2 - What do you like, what don't you like

Post by jameshale » Mon Aug 30, 2021 6:08 am

The mothership would need to contact the developer of Dash to see what formats can be read and provide a link to access them.
As to navigation, try the web API with a tablet and you will see what I mean, On a desktop when selecting the LCB API and then clicking on a link for a module say, the ability to go back to LC Script has gone.

marksmithhfx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 931
Joined: Thu Nov 13, 2008 6:48 am
Location: London, UK

Re: DataGrid2 - What do you like, what don't you like

Post by marksmithhfx » Sun Oct 03, 2021 10:10 pm

marksmithhfx wrote:
Thu Aug 26, 2021 2:02 pm
Old thread, but related topic. My questions is, are the edit mode and swipe controls in DG2 compatible? I have been fooling around with Michael's demo stack and I can get swipes to work OR I can get the EditMode controls to work, but I can't get them both to work at the same time. As soon as EditMode is turned on the DG appears to ignore swipe actions.

Has anyone gotten them both to work at the same time?
In answer to my own question, I have posted a request in the QC asking for a version of the DG that supports row re-ordering on a DG that is set to support swipes. I think this should be possible and would give us the best of both worlds (swiping and re-ordering) in a single UI. If you'd like to be notified of updates to this suggestion, or add you own comment, here is the link:

https://quality.livecode.com/show_bug.cgi?id=23312

Mark
macOS 12.6.5 (Monterey), Xcode 14.2, LC 10.0.0, iOS 15.6.1
Targets: Mac, iOS

RCozens
Posts: 138
Joined: Thu Aug 05, 2021 6:42 am
Location: Manchester, CA USA

Re: DataGrid2 - What do you like, what don't you like

Post by RCozens » Sun Oct 24, 2021 8:21 pm

Hi All,

I don't like (a) the fact that it takes LiveCode almost 16 seconds (15.98333 ticks) to set a 497,000+ line dataGrid to empty, and (b) there is no way for me to incorporate a busy cursor or progress bar during that time.

I am frustrated because all I want the dataGrid to do is display three tab-delimited character strings, each centered in its column. I've tried creating a Table Field and setting cellFormatting to true to accomplish this; but I don't know where to go from there. All the references I see in the docs re column formatting relate to dataGrids.

If I could get a Table Field to perform that one task, I would replace the dataGrid in a heartbeat: it is responsible for a large amount of traffic I see in the Message Watcher.

If you would like to verify my experience, download the attached stack, click on Scan Image, and after the scan results are displayed, click on Hide Output. The hourglass is displayed in the statement just before "set the dgText of group "Output Group" to empty", and the ticks to execute the command are put in the Message Box"

Cheers!
Attachments
Serendipity Editors 2.1 Prerelease.zip
(47.73 KiB) Downloaded 107 times
Rob Cozens dba Serendipity Software Company
Manchester, CA USA

Each new generation gives more attention to the man-made world...
and less attention to the world that made man.

RCozens
Posts: 138
Joined: Thu Aug 05, 2021 6:42 am
Location: Manchester, CA USA

Re: DataGrid2 - What do you like, what don't you like

Post by RCozens » Sun Oct 24, 2021 8:41 pm

RCozens wrote:
Sun Oct 24, 2021 8:21 pm
it takes LiveCode almost 16 seconds (15.98333 ticks) to set a 497,000+ line dataGrid to empty,
Actually it's 959 ticks, which divided by 60 = 15.98333 seconds.
Rob Cozens dba Serendipity Software Company
Manchester, CA USA

Each new generation gives more attention to the man-made world...
and less attention to the world that made man.

stam
Posts: 2679
Joined: Sun Jun 04, 2006 9:39 pm
Location: London, UK

Re: DataGrid2 - What do you like, what don't you like

Post by stam » Mon Oct 25, 2021 12:52 am

RCozens wrote:
Sun Oct 24, 2021 8:21 pm
If you would like to verify my experience, download the attached stack, click on Scan Image, and after the scan results are displayed, click on Hide Output. The hourglass is displayed in the statement just before "set the dgText of group "Output Group" to empty", and the ticks to execute the command are put in the Message Box"
Hi Rob,
i guess it's important to know what platform you're running on? I'm fairly sure you're on Windows?

On Mac it takes < 2 seconds (69 to 75 ticks), nowhere near what you've been experiencing.
I'm on a 2015 MBP TouchBar 15' running MacOS Big Sur 11.6

I use strict compilation mode, and my IDE did NOT like 'startTime' as a variable name for some reason (perhaps it's used elsewhere), so i changed it to tStartTime after declaring it and it worked well.

Perhaps it's something relating to the windows version of the IDE, or to your system etc. I was not able to replicate on Mac sadly...



Regarding busy cursor: Yes you can! Just use the spinner widget. Show it before starting your operation and hide it when done. It will spin ;)
You probably want to hide the data grid, show an enlarged version of the widget with some status text in a label or similar an then hide these when done.

HTH
Stam

rkriesel
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 118
Joined: Thu Apr 13, 2006 6:25 pm

Re: DataGrid2 - What do you like, what don't you like

Post by rkriesel » Mon Oct 25, 2021 2:19 am

stam wrote:
Mon Oct 25, 2021 12:52 am
I use strict compilation mode, and my IDE did NOT like 'startTime' as a variable name for some reason (perhaps it's used elsewhere), so i changed it to tStartTime after declaring it and it worked well.
Hi, Stam. You can see "starttime" in the dictionary. It's a built-in property. -- Dick

stam
Posts: 2679
Joined: Sun Jun 04, 2006 9:39 pm
Location: London, UK

Re: DataGrid2 - What do you like, what don't you like

Post by stam » Mon Oct 25, 2021 7:48 am

rkriesel wrote:
Mon Oct 25, 2021 2:19 am
Hi, Stam. You can see "starttime" in the dictionary. It's a built-in property. -- Dick
Thanks Dick, although it seems unlikely maybe that’s causing some of Rob’s problem?

RCozens
Posts: 138
Joined: Thu Aug 05, 2021 6:42 am
Location: Manchester, CA USA

Re: DataGrid2 - What do you like, what don't you like

Post by RCozens » Tue Oct 26, 2021 7:03 pm

stam wrote:
Mon Oct 25, 2021 12:52 am
i guess it's important to know what platform you're running on? I'm fairly sure you're on Windows?

On Mac it takes < 2 seconds (69 to 75 ticks), nowhere near what you've been experiencing.
I'm on a 2015 MBP TouchBar 15' running MacOS Big Sur 11.6

I use strict compilation mode, and my IDE did NOT like 'startTime' as a variable name for some reason (perhaps it's used elsewhere), so i changed it to tStartTime after declaring it and it worked well.

Perhaps it's something relating to the windows version of the IDE, or to your system etc. I was not able to replicate on Mac sadly...

Regarding busy cursor: Yes you can! Just use the spinner widget. Show it before starting your operation and hide it when done. It will spin ;)
You probably want to hide the data grid, show an enlarged version of the widget with some status text in a label or similar an then hide these when done.
Thanks for checking, Stam,

Yes, I'm running Windows 10 on an old HP Pavilion laptop (2.30 GHz).

I changed "startTime" to "myStartTime" & set cursor to busy instead of my hourglass. Ran the handler twice: 959 ticks & 984 ticks; busy cursor does not spin. (I have not looked at widgets; I'll check it out.)

Hopefully someone else will try this on a Windows box so I will know whether the problem lies with me & my laptop or LiveCode's implementation on Win32.

Cheers!
Rob Cozens dba Serendipity Software Company
Manchester, CA USA

Each new generation gives more attention to the man-made world...
and less attention to the world that made man.

RCozens
Posts: 138
Joined: Thu Aug 05, 2021 6:42 am
Location: Manchester, CA USA

Re: DataGrid2 - What do you like, what don't you like

Post by RCozens » Tue Oct 26, 2021 7:27 pm

rkriesel wrote:
Mon Oct 25, 2021 2:19 am
You can see "starttime" in the dictionary. It's a built-in property. -- Dick
This brings up a couple of questions:

Does LiveCode provide a list of reserved words anywhere? All I find in the Dictionary is
A word that has a special meaning to LiveCode (for example, built-in function and command names, keywords, and so forth), and should not be used as the name of a variable, custom property, custom command, or custom function
It doesn't mention a list of reserved words one could check before naming a variable.

Would the use of a reserved word in a handler throw a warning if explicitVariables is true?

PS: Setting the dgText of the dataGrid took 1199 ticks.
Rob Cozens dba Serendipity Software Company
Manchester, CA USA

Each new generation gives more attention to the man-made world...
and less attention to the world that made man.

Klaus
Posts: 13821
Joined: Sat Apr 08, 2006 8:41 am
Location: Germany
Contact:

Re: DataGrid2 - What do you like, what don't you like

Post by Klaus » Tue Oct 26, 2021 7:39 pm

Hi Rob,

alle reserved words get colorized in the script editor, that may be a little hint.


Best

Klaus

RCozens
Posts: 138
Joined: Thu Aug 05, 2021 6:42 am
Location: Manchester, CA USA

Re: DataGrid2 - What do you like, what don't you like

Post by RCozens » Tue Oct 26, 2021 8:29 pm

Klaus wrote:
Tue Oct 26, 2021 7:39 pm
alle reserved words get colorized in the script editor,
Thank you, Klaus..

The Script Editor does not recognize "startTime" as reserved; but now that you mention it I have had the Script Editor flag my misuse of reserved words in the past.

Perhaps there is some confusion about whether a term is actually a reserved word or a term used by the Dictionary in describing a command and listing its variations & arguments. An argument name in the Dictionary is not a literal or a reserved word, Dick.

Stay well!
Rob Cozens dba Serendipity Software Company
Manchester, CA USA

Each new generation gives more attention to the man-made world...
and less attention to the world that made man.

Klaus
Posts: 13821
Joined: Sat Apr 08, 2006 8:41 am
Location: Germany
Contact:

Re: DataGrid2 - What do you like, what don't you like

Post by Klaus » Tue Oct 26, 2021 8:35 pm

Hm, sure?
Bildschirmfoto 2021-10-26 um 21.34.47.jpg
Bildschirmfoto 2021-10-26 um 21.34.47.jpg (15.51 KiB) Viewed 5903 times

Post Reply

Return to “Talking LiveCode”