The field object (limitations)

Moderators: Klaus, FourthWorld, heatherlaine, kevinmiller, LCMark

Post Reply
Posts: 1098
Joined: Thu Feb 23, 2006 8:34 pm
Location: Ostenfeld germany

The field object (limitations)

Post by malte » Fri Oct 25, 2013 9:45 am

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.



Livecode Staff Member
Livecode Staff Member
Posts: 1036
Joined: Thu Apr 11, 2013 11:27 am

Re: The field object (limitations)

Post by LCMark » Fri Oct 25, 2013 2:16 pm

@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).

VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 197
Joined: Wed Jun 14, 2006 8:40 pm

Re: The field object (limitations)

Post by edgore » Mon Oct 28, 2013 5:09 pm

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!

Post Reply

Return to “Engine Contributors”