DataGrid Write-Over

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: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
lohill
Posts: 770
Joined: Tue Dec 08, 2009 6:37 pm

DataGrid Write-Over

Post by lohill » Mon Sep 20, 2010 7:58 pm

I have been doing a lot of work with datagrids and think that they are really useful. Occasionally I get into a situation where something I have done causes what looks like new data written over the top of old data. I have no idea what I am doing that causes this to happen because it does not appear to be on a regular basis. A refresh of the datagrid from the Inspector clears up the problem at the expense of losing part of the data. Are there any suggestions on what might be causing this and how I can avoid the problem in the future?

A co-question to this might be: Are there any limitations to using Dispatch "somedgCommand" to "DataGrid x" with ... as long as I fully identify the stack and card where DataGrid X resides?

Thanks for any suggestions,

Larry

trevordevore
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 1005
Joined: Sat Apr 08, 2006 3:06 pm
Contact:

Re: DataGrid Write-Over

Post by trevordevore » Thu Sep 23, 2010 1:14 pm

Prior to LiveCode 4.5 there was a bug that would reset script local variables when you right-clicked on a data grid (and possibly some other actions). This would effectively wipe out the data in the data grid as the data is stored in a script local variable which might lead to what you are seeing. LiveCode 4.5 fixes this though.
Are there any limitations to using Dispatch "somedgCommand" to "DataGrid x" with ... as long as I fully identify the stack and card where DataGrid X resides?
Assuming you don't have 2 data grids with the same name on the card then there should not be a problem.
Trevor DeVore
ScreenSteps - https://www.screensteps.com

LiveCode Repos - https://github.com/search?q=user%3Atrevordevore+topic:livecode
LiveCode Builder Repos - https://github.com/search?q=user%3Atrevordevore+topic:livecode-builder

lohill
Posts: 770
Joined: Tue Dec 08, 2009 6:37 pm

Re: DataGrid Write-Over

Post by lohill » Thu Sep 23, 2010 5:19 pm

Thanks Trevor for always coming to my aid in dataGrid matters.

Larry

trevordevore
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 1005
Joined: Sat Apr 08, 2006 3:06 pm
Contact:

Re: DataGrid Write-Over

Post by trevordevore » Thu Sep 23, 2010 6:23 pm

You're welcome Larry.
Trevor DeVore
ScreenSteps - https://www.screensteps.com

LiveCode Repos - https://github.com/search?q=user%3Atrevordevore+topic:livecode
LiveCode Builder Repos - https://github.com/search?q=user%3Atrevordevore+topic:livecode-builder

Post Reply