Val and Str in the new framework??

Hi,
Can anyone tell me where in the language reference the information regarding Integer.FromText and Text.FromInteger are located, as I cannot locate them at all???

According to the LR, it looks as though Val and Str are still valid, but I was under the impression that they were now deprecated and replaced due to the new framework??

(This post is in regards to OS X desktop apps, NOT iOS apps - just in case that makes a difference).

Thank you all in advance.

http://developer.xojo.com/data-types is where you can find out about the datatypes in the new framework and their resulting From helper methods.

Val and Str are part of the old framework and it will be around for many, many years (if not forever).

Thanks Bob - I never even knew that URL existed. I was only aware of the Language Reference!

I’m now just a bit confused as to how to convert Str to the new framework style syntax - as in the example below:

MainWindow.TopLabel.text = str(i) + " Note"

Should it be:

MainWindow.TopLabel.text = Text.FromInteger(i) + " Snippet"

Or maybe:

MainWindow.TopLabel.text = (i).ToText + " Snippet"

Thanks.

MainWindow.TopLabel.text = i.ToText + " Snippet"

Thanks Peter :slight_smile:

This one also has me stumped??

Dim R As String = Hex(Val(textfield1.text))

Is it this:

Dim R As String = Hex(Integer.FromText(textfield1.text))

Or this:

Dim R As String = Hex(Integer.FromText textfield1.text)

Thanks.