Hi All,
Similar to another question I've recently posted but different enough to require a new question which now has become two questions.
I wrote the following Sub to list the names of views in an Activity to a text file.
1. The sub is not writing anything to the Text file [Views.txt is created but empty]. It should at least write the heading, can anyone spot the error I have made?
2. When I "Log(v)" I get some View info but NOT the name. Is there a way to Write the name or am I up Ship Creek?
It all looks pretty simple but causing me grief.
Regards Roger
Similar to another question I've recently posted but different enough to require a new question which now has become two questions.
I wrote the following Sub to list the names of views in an Activity to a text file.
1. The sub is not writing anything to the Text file [Views.txt is created but empty]. It should at least write the heading, can anyone spot the error I have made?
2. When I "Log(v)" I get some View info but NOT the name. Is there a way to Write the name or am I up Ship Creek?
It all looks pretty simple but causing me grief.
Regards Roger
B4X:
Sub ViewsList
Private VFunction As TextWriter
Private WriteLineV As String
VFunction.Initialize(File.OpenOutput(File.DirRootExternal & "/Download/", "Views.txt", False))
WriteLineV = "List of Views" 'Heading
VFunction.WriteLine(WriteLineV) 'Should write heading to Views.txt but doesn't
For Each v As View In Activity.GetAllViewsRecursive
WriteLineV = v
VFunction.WriteLine(WriteLineV) 'Trying to write Views Name to Views.txt but doesn't work.
Next
End Sub