New Text Type in Plugin SDK ?

New Text Type in Plugin SDK ?

I don’t see it anywhere.

Further more then I think its sort of awesome to do this to clean up on the longstanding mess of confusing binary data with Text. But I think making “Text” as reserved word in the language is awful thing to do. Its getting very hard to code much of anything in Xojo nowadays since every word is reserved. And “Text” is very of often used as property name. (Unless of course if Xojo improves the language parser and does like Visual studio where properties don’t care if the name of the property is same as known type, so you could still have property like myNode.Text = “something”.

iOS has lots of properties in controls named Text

No, there wasn’t time in the r3 cycle to expose Text to the plugins SDK. Please file a feature request.

It’s not a reserved word, just another data type.

For me it looks like we don’t need text in the near future.

To me then I want to use it as soon as possible. Main reasons are that there are countless issues where users mis-use string, and don’t understand the difference between binary data and a Text, this goes especially for cryptography for example.

There are also cases of where Xojo’s built in classes are working on Strings like in BinaryStream, while plugin API would not allow us to read such in optimised way (unless you cheat the plugin API), as in if your making a stream then you want to read into x sized buffer, and then set the length if for example there were only 1000 bytes left to read while your buffer was 4096.

This whole mess of mixing binary and text has been really bad over the years and even worse the restrictions they have put in the plugin API on string (just for the sake of “what if we ever convert it to CFString internally”), while at same time clearly using it differently internally.

So those are my 2 cents why I want to use Text API’s as soon as possible.

You’re spot on Björn about why we split “text” from “bytes”.
We have a number of bug reports that are solely related to exactly the issue you mentioned about mishandling binary data as “text” or munging “text” by manipulating the bytes & getting unexpected results - especially true when the bytes represented something like UTF-8 strings.