Lines? in a DataGrid

LiveCode is the premier environment for creating multi-platform solutions for all major operating systems - Windows, Mac OS X, Linux, the Web, Server environments and Mobile platforms. Brand new to LiveCode? Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
lohill
Posts: 770
Joined: Tue Dec 08, 2009 6:37 pm

Lines? in a DataGrid

Post by lohill » Sun Jun 08, 2014 11:36 pm

Does anyone know the maximum number of lines a dataGrid can contain? Even a good feel for what that number might be would be helpful. I can tell you from experience that it will not allow 916,898. (That is the number of combinations of 70 things taken four at a time.)

Larry

dunbarx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 10331
Joined: Wed May 06, 2009 2:28 pm

Re: Lines? in a DataGrid

Post by dunbarx » Mon Jun 09, 2014 2:45 am

Hi,

Not sure how far one might push this, but I put this in a button on a card with one DG:

Code: Select all

on mouseUp
   put "A" & tab & "B" into temp
   repeat 100
      put temp & return after accum
   end repeat
   
   repeat 100
      put accum & return after accum1
   end repeat
   
   repeat 100
      put accum1 & return after accum2
   end repeat
   
   set the dgtext of grp 1 to accum2
   answer the number of lines of the dgtext of grp 1
end mouseUp
Worked fine. A bit over a million. But more that your 900-odd K.

Craig Newman

lohill
Posts: 770
Joined: Tue Dec 08, 2009 6:37 pm

Re: Lines? in a DataGrid

Post by lohill » Mon Jun 09, 2014 5:15 pm

Interesting Craig,

I expanded to the following and still did not have a problem

Code: Select all

on mouseUp
   put "Aaaaaaaaaaaaaaaaaaaaa" & tab & "Bbbbbbbbbbbbbbbbbbbbb" & tab & "Cccccccccccccccccccc" & tab & "Dddddddddddddddd" into temp
   repeat 100
      put temp & return after accum
   end repeat
   
   repeat 100
      put accum & return after accum1
   end repeat
   
   repeat 100
      put accum1 & return after accum2
   end repeat
   
   set the dgtext of grp "DataGrid 1" to accum2
   answer the number of lines of the dgtext of grp "DataGrid 1"
end mouseUp
Larry

dunbarx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 10331
Joined: Wed May 06, 2009 2:28 pm

Re: Lines? in a DataGrid

Post by dunbarx » Mon Jun 09, 2014 6:22 pm

Larry.

So we have more text in the DG, but the same number of lines. I guess this is a good thing, as far as it goes.

But what did you mean when you said ..."and still did not have a problem"? Does that mean that your earlier 900K line DG still does?

If you: "answer the length of accum2", and compare it with the length of your original problem DG, is there anything to learn there? What were the elements of your combinatorial thingie?

Craig

Post Reply