257+ Character Text Property Behavior

The limit for the number of characters you can set as the default value in a text property is 256. However, the character limit for the string block (" ") in block code is 512. By setting a property to a string value that is longer than 256 characters, you could theoretically bypass the default 256 character limit.
I’ve made an attempt at doing this, but the system I made no longer functioned properly once the string entered was longer than 256 characters. Thus, I have determined that something with text properties breaks at the default text property character limit.

This conclusion is not based in a lot of evidence. The system that had malfunctioned used a lot of indexing and pulling substrings from the text, and whether it worked even when the string was less than 256 characters was uncertain at the time. My question is: do text properties malfunction in any way past 256 characters, and if so, what actually breaks? Does the property simply not register any characters past the limit, or does one of the blocks just not work properly with large strings?

3 Likes

check if the system works with under 256 characters.

what happens in the current version, if there is one?

I don’t have that particular version of it anymore, nor do I care to reconstruct it.

< 257 characters is fine, but any more and it doesn’t work properly. Unsure as to what exactly breaks.

1 Like

I think it’s the memory allocation that breaks the code
Like when you make a string, it allocates a certain amount of memory (to save time), and when you get a substring / find a character / etc, it uses some of that memory
So I think your string allocates 512 bytes (for 512 characters), but your substring usage might bring it over 512B, which would break the system

3 Likes

Hmm. I don’t think that’s it. Even when the string is only a couple characters over the 256 limit, it still breaks. Also, nothing ever breaks if its below 257 characters. The extra memory allocation would still affect the string if it was under the limit, and could still push the amount of memory used past 512 bytes.