text ? text ??

Greetings.

I have a new Xojo project, one TextArea, one button.

The code in the Action event of the button is:-

dim source as text
source = TextArea1.Text

This fails to compile at the second line. The error is “Expected Text, but got String”.

Truly astounding. I would have thought that the text of a textArea would be text.

Any thoughts on how to resolve this peculiar problem ?

Regards,
Tony Barry

The Text property is an unfortunate leftover from the old framework. Just tack .ToText on the end.

source = TextArea1.Text.ToText