Use of dgIndex
Michael Doub
mike at doub.com
Tue Nov 8 08:15:49 EST 2011
This is driving me crazy. I modified my real project code as well as my test stack to use the following:
put the dgIndex of me into tindex
put the dgIndexes of theGrid into tlist
set itemdel to comma
put itemOffset(tindex,tlist) into myPosition
The test stack works fine, but in my project code dgIndex is not retuning anything! I captured the value of me in both the test stack and my project. I get different values of me!
test stack returns group "Row Template 0001" (number part seems to be = to dgLine and it increments)
my project stack returns group "Row Template"
Does anyone know if there are any interactions between the debugger and data grids? I wonder if I have messed up some internal state of the data grid while debugging.
My project code is managing 2 different sortings of the data. The different sortings are being directed to the data grid by calling
Dispatch "SortDataByKey" to group "DataGrid" of card Main with \
"LastName","text","ascending",true
get the sortOrder of Card "Main"
and
Dispatch "SortDataByKey" to group "DataGrid" of card Main with \
"DaysTill","numeric","ascending",true
from the open stack hander.
I can't believe that sorting is causing this but I am at a loss at this point …. And I have a sinking feeling that SortDataByKey is not a stable sort if it is called multiple times. Does anyone know for sure?
More information about the use-livecode
mailing list