Datagrid Error: column template

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
Linh
Posts: 16
Joined: Sun Mar 27, 2011 2:46 pm

Datagrid Error: column template

Post by Linh » Fri May 13, 2011 9:45 am

Hi guys,

I use a table datagrid. Yesterday, everything is still OK, but today I open the card again, and there is a error has occurred:


"An error has occurred in behavior for the column template:
Chunk: error in object expression"
"Edit Script" or "OK"


I click "Edit Script" and LiveCode open code of button "Data Grid" of group "Behaviors" of card "card id 1002" of stack "..." (I think it's template card of datagrid). This line is highlighted: "if pIndexesToDraw is not empty then"

I haven't modified anything in this card. I don't know how to fix this problem :(. Have you ever seen this error and how to fix it? Thanks so much!!!!

Linh

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

Re: Datagrid Error: column template

Post by Klaus » Fri May 13, 2011 12:27 pm

Hi Linh,

I have not encountered this error, but something else and similar to this.
It was also an error from the datagrid library (which I did not touch!) and
I "fixed" it by restarting LiveCode. :D

I am afraid you cannot do very much about it!
If you can reproduce this error then you could bug-report it to: bugs@runrev.com


Best

Klaus

Linh
Posts: 16
Joined: Sun Mar 27, 2011 2:46 pm

Re: Datagrid Error: column template

Post by Linh » Sat May 14, 2011 8:05 am

Thank Klaus (again :D, you always help me - and other guys - when we post any question, and your answers are very useful 8) )! I try to restart, but the bug still appear. So I delete the old datagrid and create a new one. The problem is the default sort by column :D. LiveCode has bug when sort one column of mine (I don't know why, the other sort column is still OK). Maybe it's a bug of LiveCode.

Cheers,
Linh

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

Re: Datagrid Error: column template

Post by Klaus » Sat May 14, 2011 11:40 am

Hi Linh,

what exactly does not work?
I have been sorting datagrids and never had problems.

Best

Klaus

Linh
Posts: 16
Joined: Sun Mar 27, 2011 2:46 pm

Re: Datagrid Error: column template

Post by Linh » Sat May 14, 2011 1:25 pm

Hi Klaus,

I put this in openCard:

set the dgProp["sort by column"] of group "dtgContractList" of card "contract_list_card" of stack "ListStack" to "product_title"
set the dgColumnSortDirection["product_title"] of group "dtgContractList" of card "contract_list_card" of stack "ListStack" to "ascending"


If I set in openCard: sort by column "product_title", the error occurred. Sort by other columns is still OK.

Linh
Posts: 16
Joined: Sun Mar 27, 2011 2:46 pm

Re: Datagrid Error: column template

Post by Linh » Mon May 16, 2011 5:55 am

Hi Klaus,

I understand why I can't sort by that column at the openCard. Because the text of one line in that column have enter (CR), so LiveCode can't sort by that column :D

Post Reply