Datagrid's error

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
giovannic
Posts: 30
Joined: Fri Apr 17, 2009 7:05 pm

Datagrid's error

Post by giovannic » Thu Jul 23, 2009 4:05 pm

Hi all.
I'm using a simple table dataGrid in a stack o mine and I often get an error with a messagebox in which I can read:

An error has occurred in behavior for the column template:
Chunk: no such object

In this box I can see two btns: "Edit Script" and "OK".
If I choose "Edit Script" a script Window is open at line 3410 of "_table.DrawColumns" handler in the dataGrid's library.
At that line I can read

if pIndexesToDraw is not empty then etc.
I get this error a lot of times but I can't reproduce it.
At same conditions sometimes I've, but not always...
What's the matter?
Thank u for all and bye

giovannic
Posts: 30
Joined: Fri Apr 17, 2009 7:05 pm

How to reset the dataGrid?

Post by giovannic » Thu Jul 23, 2009 5:15 pm

Hi.
After 2 hours of tries XD I think that my problem is
related to one of the dgProp i use during my elaboration...
So my question is:
there is a way to reset the dataGrid's custom property set
properties to their default values before I re-modify'em?

shadowslash
Posts: 344
Joined: Tue Feb 24, 2009 6:14 pm
Contact:

Re: How to reset the dataGrid?

Post by shadowslash » Tue Jul 28, 2009 2:05 pm

giovannic wrote:Hi.
After 2 hours of tries XD I think that my problem is
related to one of the dgProp i use during my elaboration...
So my question is:
there is a way to reset the dataGrid's custom property set
properties to their default values before I re-modify'em?
A possible way would be to put the old properties in a variable or into another set of properties then restore them later.
Parañaque, Philippines
Image
Image

giovannic
Posts: 30
Joined: Fri Apr 17, 2009 7:05 pm

Re: How to reset the dataGrid?

Post by giovannic » Fri Jul 31, 2009 11:35 am

shadowslash wrote: A possible way would be to put the old properties in a variable or into another set of properties then restore them later.
Hi! First of all TY for ur reply and excuse my delay!!!
Yes, it's a good solution to backup the original setting to reset'em before my changes.
But my problem's still there, even if in a lower frequency.
I've had a similar problem trying to populate a dataGrid in a not open stack
but, in this case, the stack and card in where my dataGrid is is opened.

See u

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

Post by trevordevore » Fri Jul 31, 2009 8:19 pm

You mention that you changed some of the dgProps. If you could provide some more information on the changes you've made to the default data grid it would help troubleshoot the issue.

Have you customized the column behaviors at all? If you have then based on your description it may be that your FillInData or LayoutControl handlers reference objects that do not exist, hence the "no such object" error.
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

giovannic
Posts: 30
Joined: Fri Apr 17, 2009 7:05 pm

dataGrid issue

Post by giovannic » Fri Jul 31, 2009 9:54 pm

Here are the dgProp properties I use to modify in my script:

dgProp["row template"]
dgProp["columns"]
dgProp["show header"]
dgProp["sort by column"]

As u can see I don't re-touch too much properties in my
script and the error appear (apparently) in random cases!
Before u say something about my use of dgProp["row template"]
(LOL) I can say that I use this property because I've included the
template group in a card of the same stack in which my dataGrid
is so I can port my stack in a simply way in any of my application.
By the way the dataGrid error was there even before I made
this little "hack"!!! LOL
I hope I can find a situation in which I can reproduce the error.
I know that in this way it's impossible to find the issue!
TY for your reply and help.

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

Post by trevordevore » Fri Jul 31, 2009 9:57 pm

You aren't modifying many properties by you are modifying the row template which could very well be the cause. Have you looked over the column behaviors in the group that you are assigning to the "row template" property to make sure they don't reference any objects that don't exist?
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

giovannic
Posts: 30
Joined: Fri Apr 17, 2009 7:05 pm

Post by giovannic » Sun Aug 02, 2009 7:10 am

As I said in the post above:
the dataGrid error was there even before I made this little "hack"!!!
Anyway the row template property refeer to an existing object (a button I've copy/pasted onto the same card all objects I've found in the card of the datagrid template stack, then I've updated the ID of the button containing the column behavior). And I don't use the column behavior. It's a reeeeeaallly simple table dataGrid!
As always... thank u for ur interest and support! Bye

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

Post by trevordevore » Sun Aug 02, 2009 2:32 pm

What are you setting the column names to? Are you using integers for names by chance?
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

giovannic
Posts: 30
Joined: Fri Apr 17, 2009 7:05 pm

mmmhhh...

Post by giovannic » Sun Aug 02, 2009 6:13 pm

OK. And here I am!
Ur post make me think and I've made some tries.
Using integers name for the columns causes an error similar to
that I've posted but not equal. This message says:

Code: Select all

An error has occurred in behavior for the column template:
Chunk: can't find background
but if I click on "Edit Script" button nothing happens.
So thank u for this warning (I'll never use integers for column names)
but "my" error is different... sorry...
Thank u again

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

Post by trevordevore » Mon Aug 03, 2009 2:54 pm

Hmm, I'm going to need more info to troubleshoot this then. Do you have a simple stack that demonstrates the problem that you could upload?
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

giovannic
Posts: 30
Joined: Fri Apr 17, 2009 7:05 pm

dgError

Post by giovannic » Wed Aug 05, 2009 7:31 am

trevordevore wrote:Hmm, I'm going to need more info to troubleshoot this then. Do you have a simple stack that demonstrates the problem that you could upload?
If u're talkin about the first post of this thread sorry, but as I sayd I've the problem in apparently random cases. It's surely related to the "quality" of data I try to put into the dataGrid but I've not understand what are the problematic data yet.

Let me know if u need more help from me.

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

Post by trevordevore » Wed Aug 05, 2009 12:26 pm

Well there isn't much to go on right now since you don't have arepeatable case and I can't see your code. If you come up with a recipe let me know.
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

giovannic
Posts: 30
Joined: Fri Apr 17, 2009 7:05 pm

OK...

Post by giovannic » Wed Aug 05, 2009 6:20 pm

... of course, I'll do it.
Unfortunately I'me going mad to find a problematic case!
Thank u very much!

Post Reply