This is my first attempt at using a datagrid, so I have to assume I am doing something wrong.
I am reading a text file, and populating the first two columns of the grid. Here is the code:
Code: Select all
put empty into tGrid
put 1 into tLnbr
repeat while tLnbr <> 0
read from file gLogFile for 1 line
put it into tLine
put the result into tRes
if tRes = "" then
put word 1 of tLine into tGrid[tLnbr]["Col 1"]
put word 2 of tLine into tGrid[tLnbr]["Col 2"]
add 1 to tLnbr
else
put 0 into tLnbr
end if
set the dgData of grp "FldGrid" to tGrid
At this point the code is not intended to do anything really useful... I'm really just trying to learn how to use datagrids. But here's the problem...
With 100 records in the text file, the grid takes about 20 seconds to load on my Windows PC with Livecode 5.5.3. On my iPad1, it takes more than a minute. Surely this is not normal?
I read somewhere that using dgData is faster than dgText, but for me they seem to be about the same.
I also read that I shd check the Persistent Data box, but that makes no difference.
What am I missing here???
TIA
--paul