Datagrid's error
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
Datagrid's error
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
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
How to reset the dataGrid?
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?
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?
-
- Posts: 344
- Joined: Tue Feb 24, 2009 6:14 pm
- Contact:
Re: How to reset the dataGrid?
A possible way would be to put the old properties in a variable or into another set of properties then restore them later.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?
Re: How to reset the dataGrid?
Hi! First of all TY for ur reply and excuse my delay!!!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.
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
-
- VIP Livecode Opensource Backer
- Posts: 1005
- Joined: Sat Apr 08, 2006 3:06 pm
- Contact:
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.
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
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
dataGrid issue
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.
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.
-
- VIP Livecode Opensource Backer
- Posts: 1005
- Joined: Sat Apr 08, 2006 3:06 pm
- Contact:
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
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
As I said in the post above:
As always... thank u for ur interest and support! Bye
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!the dataGrid error was there even before I made this little "hack"!!!
As always... thank u for ur interest and support! Bye
-
- VIP Livecode Opensource Backer
- Posts: 1005
- Joined: Sat Apr 08, 2006 3:06 pm
- Contact:
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
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
mmmhhh...
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:
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
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
So thank u for this warning (I'll never use integers for column names)
but "my" error is different... sorry...
Thank u again
-
- VIP Livecode Opensource Backer
- Posts: 1005
- Joined: Sat Apr 08, 2006 3:06 pm
- Contact:
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
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
dgError
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.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?
Let me know if u need more help from me.
-
- VIP Livecode Opensource Backer
- Posts: 1005
- Joined: Sat Apr 08, 2006 3:06 pm
- Contact:
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
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