Datagrid Bug

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

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
alasdair23
Posts: 12
Joined: Wed Nov 28, 2007 10:58 am
Contact:

Datagrid Bug

Post by alasdair23 » Wed Aug 22, 2012 1:24 pm

I've found what I can only describe as a "bug" with Datagrids on Mac OS X. I am a reasonably competent RunRev coder, so I hope that this is just a case of me not reading a particular bit of documentation... however:

In the enclosed stack there are two data grids - one shows 7 lines [of 30] and the other shows 23 lines [of 30]. Populate the grids with the same content.
Then when one clicks on an item in the grid, it puts it's long name in the messagebox.

However, if one scrolls [in ether grid] down to reveal the lower items and clicks on these, the WRONG name is returned.

Looks like this has something to do with scrolling. I can't imaging this is a feature.

HELP!
Attachments
datagrid-example.livecode.zip
(6.39 KiB) Downloaded 394 times

Klaus
Posts: 14177
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Re: Datagrid Bug

Post by Klaus » Wed Aug 22, 2012 1:37 pm

Hi Alasdair,

this is the way it works! :D
Check "cached controls" for the grids and all is fine!

When this is UNCHECKED, then the DG library will only copy that much template groups to the datagrid that are VISIBLE in the grid!
If checked then ALL necessary groups are copied to the datagrid at once.

In any way do NOT rely on the names of the groups and their containing objects if possible 8)


Best

Klaus

Klaus
Posts: 14177
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Re: Datagrid Bug

Post by Klaus » Wed Aug 22, 2012 1:38 pm

And since this is not OS X specific, I will move this thread to the "Talking LiveCode" forum. :D

dunbarx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 10305
Joined: Wed May 06, 2009 2:28 pm

Re: Datagrid Bug

Post by dunbarx » Wed Aug 22, 2012 2:21 pm

Klaus.

Fascinating. But where is this "cached controls" to be found?

Craig

Klaus
Posts: 14177
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Re: Datagrid Bug

Post by Klaus » Wed Aug 22, 2012 2:54 pm

Hi Craig,

in the inspector "Basic Properties" right under the "lineheight" text field.
Oh, it is named "cache controls" without a D


Best

Klaus

dunbarx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 10305
Joined: Wed May 06, 2009 2:28 pm

Re: Datagrid Bug

Post by dunbarx » Wed Aug 22, 2012 3:19 pm

Klaus.

Ah. I didn't see it because it is grayed out. What property allows it to be checked?

Thanks,

Craig

Klaus
Posts: 14177
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Re: Datagrid Bug

Post by Klaus » Wed Aug 22, 2012 3:33 pm

Hi Craig,

this is only available for "Form" datagrids.


Best

Klaus

alasdair23
Posts: 12
Joined: Wed Nov 28, 2007 10:58 am
Contact:

Re: Datagrid Bug

Post by alasdair23 » Thu Aug 23, 2012 3:14 pm

Klaus wrote:Hi Alasdair,

this is the way it works! :D
Check "cached controls" for the grids and all is fine!

When this is UNCHECKED, then the DG library will only copy that much template groups to the datagrid that are VISIBLE in the grid!
If checked then ALL necessary groups are copied to the datagrid at once.

In any way do NOT rely on the names of the groups and their containing objects if possible 8)


Best

Klaus
Klaus, you are a star - thank you so much!

Post Reply