Hey guys! For some reason this code to add stuff to my listview only works once and then the listview disappers for some reason. Here's my code:
B4X:
Sub Globals
Dim val As Object
End Sub
Sub listoutput_ItemClick (Position As Int, Value As Object)
listoutput.Clear
val = Value
timer7.Initialize("timer7", 500)
timer7.Enabled = True
End Sub
Sub timer7_Tick
ssh3.Initialize("ssh3", hostname.Text, port.Text)
ssh3.authenticateWithPassword(username.Text, password.Text)
ssh3.execCommand("cd " & val & " && " & "ls", 16)
timer7.Enabled = False
End Sub
Sub ssh3_CmdExecuted (Success As Boolean, Result As List, TaskId As Int)
Dim count As Int
count = 0
Do While count < Result.Size
listoutput.AddSingleLine(Result.Get(count))
count = count + 1
Loop
End Sub