Analyze Project - Depreciated .ToText?

fileOut.WriteLine( ConvertEncoding( finData.ToText, Encodings.UTF8 ) )

According to the Analyze Project function, .ToText is depreciated. I looked here → String.ToText — Xojo documentation and it states “This item was deprecated in version 2020r2. There is no replacement.” So what does this mean and is there a new means to Writing Data to a file?

Use finData.ToString. If finData is a Currency type you can use Nil for the Locale to remove symbols.

Ok. Thank you I will try that now…

For the next time, get help with Autocomplete: place the cursor after the dot and press the Tab key, you will get hints:

And you should read what the OP wrote:

Following your example, here is the screenshot from the Autocomplete for String:

as you see: String.ToText is deprecated without a replacement. That is why OP is asking:

Because there is no Text type anymore; it was replaced by the String type years ago. And there is no String.ToString function as strings are already of type String and need no conversion.

X.ToText should be replaced by X if X is a string and by X.ToString in all other cases.

1 Like

Yes, we know.
I was just trying to explain to Emile why the AutoComplete doesn’t work for OP’s case. There is no autocomplete suggestion for string.ToText because there is no replacement. Showing a Integer.ToText screenshot does not apply here.