Saving TextField values...

Hey all,

I know this may be an extremely basic thing, but I’m just getting started and would appreciate the help.

I am wanting to be able to save the values in a textfield to a file so that when the app is re-opened, the values are automatically filled with the values saved last time, instead of resetting to the default each open.

Would appreciate anyone’s help!

Thank you

Have you read the manual yet?
There’s a PDF in your Xojo install folder if you prefer that. Read it cover to cover.

You’re looking specifically at writing out a text file, and reading it back in.
Once you’ve read the manual, the doc entries at will make so much more sense.

To save in text file someting like this

Dim f As FolderItem Dim stream As TextOutputStream f = GetSaveFolderItem(FileTypes1.Text, "Daily Planet Staff.txt") If f <> Nil then stream = TextOutputStream.Create(f) f.MacCreator = "ttxt" Stream.WriteLine("Perry White") Stream.WriteLine("Lois Lane") Stream.WriteLine("Jimmy Olsen") Stream.Close End If
And read the manual like Tim linked
Tim is faster than me :slight_smile:

@Tim Parnell Thank you, I had not seen that yet. It will help!

@Loannis Kolliageorgas Thank you for taking the time to help with this! It’s appreciated.