What I want to do it to save this collection including the order into an Array, empty the DG and fill the DG with a new collection.
Later I want to place a saved collection back into this DG and in the same order as I saved it.
I thought that would be straight forward by doing it the following way but this does not work?
First save the DG data into an array named ArrayCollection1:
Code: Select all
put the dgData of group "NumbersCollection" into ArrayCollection1
Code: Select all
put ArrayCollection1 into theDataA
put 1 into theLineNo
dispatch "AddData" to group "NumbersCollection" with theDataA, theLineNo
put the result into theNewIndex -- integer if successful, error string otherwise
set the dgVScroll of group "NumbersCollection" to theLineNo
What am I doing wrong and how to achieve this as easy as possible?