DataGrids: dgDataOfIndex calls "FillinData" twice?

David Bovill david at vaudevillecourt.tv
Wed Sep 23 08:29:00 EDT 2009


I guess this is a question for you Trevor :)

In trying to debug an interface that makes asynchronous calls to update a
datagrid I tacked donw the following feature / aspect of using:

set the dgDataOfIndex [indexNum] of grp "Datagrid" to recordArray

And that is that it calls you user defined "FillinData" twice, while:

set the dgData of grp "Datagrid" to dgArray

call "FillinData"  only once.

Tracking this down using the executioncontexts it seems that "set the
dgDataOfIndex" first calls the handlers that "set the dgData" does and then
in addition an extra:

_RefreshIndexes
> _UpdateIndexWithNewData
> FillInData
>

resulting in a second call to "FillInData".

In my case where I have a lot of action updating individual lines of the
datagrid each second, I want to do this as fast as possible and also to
avoid possible recursion with the async loads. It would help greatly to
understand why "FillInData" needs to be called twice with "set the
dgDataOfIndex" and therefore what my handler should do with each call.



More information about the use-livecode mailing list