Page 1 of 1

dataGrid's dgText hangs the execution in some cases

Posted: Sat Apr 18, 2009 1:33 pm
by giovannic
Hi all!
I've a little problem with the dgText datagrid's property that, in some circumstances hangs the execution of the script when set to empty.

To avoid to try to describe with words the problem I've prepared a little example stack that reproduce the issue.
Where and how can I attach this stack?
If I can't attach the stack here is how to create it:

- Create a new mainstack with a substack;
- Put a datagrid named "myDG" in the substack and a button in the mainstack;
- Put this lines in the script of the button:

Code: Select all

on mouseUp
   set the dgText of grp "myDG" of stack "Untitled 2" to empty
   set the dgText of grp "myDG" of stack "Untitled 2" to "Hello" & tab & "World" & tab & "!!!"
   set the dgText of grp "myDG" of stack "Untitled 2" to empty
   
   go to stack "untitled 2"
end mouseUp
U can see that the stack "Untitled 2" is never opened.
The execution hangs after the first:

Code: Select all

   set the dgText of grp "myDG" of stack "Untitled 2" to empty
My question is: it's a bug or it's an incorrect use of the dgText property?
Thank u for all and bye!

[PS: I've moved this post... I've posted it in the wrong place... excuse me]

Posted: Mon Apr 20, 2009 5:31 pm
by trevordevore
The data grid is choking because the stack the data grid is on is not open. The data grid currently relies on the formattedHeight to render some of it's data but formattedHeight returns 0 when the stack is closed. The current workaround is to set data in the preopenstack handler. I will look at delaying any rendering until the data grid is open in the next version.

Re

Posted: Mon Apr 20, 2009 10:38 pm
by giovannic
Thank u Trevore, for ur reply(es!!!)
See u!