DataGrid Issue with last line in view

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

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
baoancnc
Posts: 2
Joined: Mon Dec 21, 2020 8:57 am

DataGrid Issue with last line in view

Post by baoancnc » Mon Dec 21, 2020 9:06 am

:( I have the issue that when I click the last line in view of a DataGrid which is also the last of three line items, the Script of the DataGrid is not activated.
Situation:
- There is a vertical scrollbar showing.
- DataGrid is scrolled all the way to the top
- After clicking the line the DataGrid scrolls the full line in view and highlights the line. After this when I click the line again the script is started.
Anybody else able to confirm this buggy?
Working in Windows 10
Regards,

dunbarx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 9660
Joined: Wed May 06, 2009 2:28 pm
Location: New York, NY

Re: DataGrid Issue with last line in view

Post by dunbarx » Mon Dec 21, 2020 2:41 pm

Hmmm.

I made a quick dataGrid and filled by hand with seven lines and three columns.The DG had both H and V scrollbars right out of the box. Also made a field "fff". In the group script:

Code: Select all

on mouseUp
   put the clickField into fld "fff" --gives the layer number
end mouseUp
Initially, clicking on any "cell" gave back something like "field 4", with the field number increasing down and over, not over and down. Enlarging the DG to eliminate the scrollbars gave empty if I clicked on a low empty "cell".

I had always referenced DG field names with, as an example:

Code: Select all

put the name of fld 4 into fld "fff"
which is "field Col 1 0004".

BUT, after simply reSizing, I am looking, right now, at the same DG where "field 1", that is "field Col 1 0001" is now at the bottom of Column 1. Field 7 is now in the upper left corner. In fact, all of the first row is now the bottom row, and all of row 7 is now the top row. They switched places. The row sequence has gone from "1,2,3...7" to "7,2,3...1".

I will make another DG and see if this happens again.

Not sure this answers your question. But something is going on with DG's. LC 9.6.1. Mac OS 10.15.7.

Craig

dunbarx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 9660
Joined: Wed May 06, 2009 2:28 pm
Location: New York, NY

Re: DataGrid Issue with last line in view

Post by dunbarx » Mon Dec 21, 2020 3:00 pm

OK. A new DG, after resizing, did the same thing, though now rows 1 and 2 have switched places.

I do not see that the functionality of the DG itself has changed particularly, except that I can no longer trust that "field Col 1 0002" will contain the visual contents of the second "cell" in column 1. Clicking on a "cell" and entering data still works just fine. If I extract the dgData, change any field value, and restore, no problem.

I wonder if Trevor might chime in? Was it important that those field names stay locked? But I have had many occasions to reference fields from afar by script, as opposed to simply entering data into them by hand. I can no longer do that.

Craig

dunbarx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 9660
Joined: Wed May 06, 2009 2:28 pm
Location: New York, NY

Re: DataGrid Issue with last line in view

Post by dunbarx » Mon Dec 21, 2020 3:17 pm

baoancnc

You had asked about a handler not firing in your DG. If you place a breakpoint right after the first line, does execution halt? I want to know if the handler is not firing, or if clicking on a blank line simply does not do anything.

Craig

Post Reply

Return to “Talking LiveCode”