Page 1 of 1

The field object (limitations)

Posted: Fri Oct 25, 2013 9:45 am
by malte
Hi all,

I am currently struggeling with a customer that needs to display a single line that is 11k characters long in a field (under Win). This seems to be over the length liveCode is able to display. That got me wondering what the limitations of the field object are in terms of length of data it can display and if those could be lifted. I am getting more and more into situations where I need to be able to display really long text with really long lines. If somebody could shed some light here, I really would appreciate that.



Re: The field object (limitations)

Posted: Fri Oct 25, 2013 2:16 pm
by LCMark
@malte: There are three sets of limitations at the moment that kick in at various points...

The first is that a paragraph is limited to 64k bytes - so up to 32k unicode chars (2 bytes each) or 65k native chars (1 bytes each) [ or any combination ].
The second is that the way the field currently renders in the x-direction means there is a 32767 pixel limit.
The third is that the API we use for measuring / drawing text on Windows has a 16k char limit.

The first isn't an issue in this case, nor the third - so it's the second you will be having problems with in this case. With the new graphics architecture in 6.5, this might be something that wouldn't be 'too hard' to lift - I think the changes needed would be limited to making parts of the field code use 32-bit co-ordinates rather than 16-bit ones (at least in the x direction).

Re: The field object (limitations)

Posted: Mon Oct 28, 2013 5:09 pm
by edgore
This would be a great fix to have - if nothing else it will prevent me from getting confused when I look at variable watcher and see a variable that appears to be empty, when it's really just a very, very long line.

Given how easily I get confused this will be a big win!