I broke the datagrid

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
sturgis
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 1685
Joined: Sat Feb 28, 2009 11:49 pm

I broke the datagrid

Post by sturgis » Thu Oct 29, 2009 5:25 pm

Hey, need some help to fix my datagrid functionality.

Something happened. Don't know what. My older apps with datagrid work fine, but if I recreate the same app by hand now, my datagrids toss an error.

The popup error is "an error as occurred in behavior for the row template:
Chunk: no such object.

Since i'm using tRev. clicking Ok pops the script up for btn "Data Grid"at line 6921 where it says "throw empty"

Can someone give me a clue how to fix this?

sturgis
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 1685
Joined: Sat Feb 28, 2009 11:49 pm

Post by sturgis » Thu Oct 29, 2009 6:18 pm

Got it fixed, must have managed to corrupt the revdatagridlibrary.rev file. Replaced it with a fresh copy and everything is good again.

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

Post by trevordevore » Thu Oct 29, 2009 6:18 pm

Sounds like your FillInData or LayoutControl handler is referring to an object that doesn't exist in the row template. I would check your object references in your row behavior script.

One quick way to find the culprit is to wrap your FillInData or LayoutControl code in try/catch:

Code: Select all

on FillInData ...
    try
        ...
    catch e
        put e
    end try
end FillInData
This would print the full error out in the message box.
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

sturgis
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 1685
Joined: Sat Feb 28, 2009 11:49 pm

Post by sturgis » Thu Oct 29, 2009 6:27 pm

Hey, thats a cool trick! I'll stash it away for later. This time i'm pretty sure I just managed to toast something behind the scenes. Replacing all the files in toolset fixed the problem. Didn't have to replace all of em I suppose, but who knows what else I managed to mess up.

Everything is working dandy now. Definately adding your tip to my notebook tho.

Still not sure what I did to cause the issue in the first place.
trevordevore wrote:Sounds like your FillInData or LayoutControl handler is referring to an object that doesn't exist in the row template. I would check your object references in your row behavior script.

One quick way to find the culprit is to wrap your FillInData or LayoutControl code in try/catch:

Code: Select all

on FillInData ...
    try
        ...
    catch e
        put e
    end try
end FillInData
This would print the full error out in the message box.

Post Reply