Datagrid SetDataOfLine 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
espais
Posts: 14
Joined: Thu Jun 22, 2006 12:16 am

Datagrid SetDataOfLine error

Post by espais » Wed Apr 22, 2009 12:03 am

Hi,

I'm trying to update one line in a datagrid from a field text, but I get this error.

The handler: SetDataOfLine has reached the recursion limit of: 400000. Execution will be terminated to prevent hang.

The code from the field text:

on rawkeydown thekey
Global t_LineData

switch thekey
case 65293
put fld ftmp into t_LineData["Col 2"]
send "SetDataOfIndex 1,2,fld ftmp" to group "datagrid"
break
default
pass rawkeydown thekey
end switch
end rawkeydown

Global t_LineData is get from the datagrid on selection change, and from the field text I want to perform some operations over some of the values of the line selected, modify them and update the line into the datagrid.

What I'm doing wrong? Any idea of how do it better?

Salut,
Josep

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

Post by trevordevore » Wed Apr 22, 2009 6:10 pm

[Here is the response I sent to the message you sent to the Rev use list]

I'm guessing that the last 2 parameters you are passing aren't correct. For the 2nd param you are passing 2. Do you have a key/column named "2" in your data grid? Or did you want to pass "Col 2"? Also, for the 3rd parameter you are passing "fld ftmp". Try putting the value into a variable and sending that or using dispatch.

dispatch "SetDataOfIndex" to group "datagrid" with 1, "Col 2", the text of fld "ftmp"

Does that work?
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

espais
Posts: 14
Joined: Thu Jun 22, 2006 12:16 am

Post by espais » Wed Apr 22, 2009 10:53 pm

Yes, now is working. Thanks Trevor.

Salut,
Josep

Post Reply