Hi All,
I am looking for the simplest way to extract text line by line from a TextField.
Below is dummy code as an attempt to show what I am trying to achieve. Something like "TextReader" on text files.
Regards Roger
I am looking for the simplest way to extract text line by line from a TextField.
Below is dummy code as an attempt to show what I am trying to achieve. Something like "TextReader" on text files.
Example:
Sub Process_Globals
Private LineX As String
End Sub
Sub Globals
Private txtField As B4XFloatTextField
End Sub
Sub ReadLines
For j = 0 To 999
LineX = txtField.line(j) 'Get one line from the textfield
'Put Linex in an array of strings and other stuff.
If LineX = "EndPlay" Then Exit 'EndPlay indicates end of file.
'Now loop and get next line from the textfield.
Next
End Sub
Regards Roger
Last edited: