TextOutputStream.WriteLine

From Xojo Documentation

Method

TextOutputStream.WriteLine(Text as String)

Supported for all project types and targets.

Writes the text passed to the TextOutputStream and appends the Delimiter to the end of the line.

Example

This example displays the Save As dialog box. A text file is then created and the text properties of three TextFields are written to the new file. Finally the file is closed.

Var file As FolderItem = FolderItem.ShowSaveFileDialog(FileTypes1.Text, "MyInfo.txt")
If file <> Nil Then
Var output As TextOutputStream
output = TextOutputStream.Create(file)
output.WriteLine(NameField.Value)
output.WriteLine(AddressField.Value)
output.WriteLine(PhoneField.Value)
output.Close
End If