how to get text from textfield

how do you do this? why do I get a BUG when I try to run my app.

dim c as TextField1.text
dim c as string = TextField1.Text

Or if you want the Text type:

dim t as Text = TextField1.Text.ToText

thanks, now here is the stupid question, what is the difference between c as string and t as text. If the textfield is “Johns House”, isn’t a text result and a string result the same.

anyway, your reply will help me. thanks so much.

Not a stupid question at all.

String is the old framework which makes assumptions behind the scenes that can cause unexpected bugs.

Text is the new framework which is much more strict and encoding friendly.

This thread might help you.

https://forum.xojo.com/22534-string-vs-text-an-explanation

So, this means Text will works only with some 2015 Xojo version