I have a tabhost that has 6 panels that were intitialized. They all contain several EDITTEXT views that I would like to reset to BLANK after a button is tapped to save a record to a table. I can blank all EDITTEXT views if I write the same code 6 times, one for each panel. But, I would like to cycle through all panels programmatically as soon as the record is saved. Below is the code I tried to iterate through all 6 panels, but it crashes at this line:For i = 0 To MyPanel.NumberOfViews - 1
Dim MyPanelList As List
Dim i, j As Int
Dim MyPanel As String
MyPanelList.Initialize()
MyPanelList.AddAll(Array As String("Panel1","Panel2","Panel3","Panel4","Panel5","Panel6"))
For j=0 To MyPanelList.Size-1
MyPanel=MyPanelList.Get(j)
For i = 0 To MyPanel.NumberOfViews - 1
If MyPanel.GetView(i) Is EditText Then
Dim MyViewETReset As EditText
MyViewETReset = MyPanel.GetView(i)
MyViewETReset.Text=""
End If
Next
Next
Dim MyPanelList As List
Dim i, j As Int
Dim MyPanel As String
MyPanelList.Initialize()
MyPanelList.AddAll(Array As String("Panel1","Panel2","Panel3","Panel4","Panel5","Panel6"))
For j=0 To MyPanelList.Size-1
MyPanel=MyPanelList.Get(j)
For i = 0 To MyPanel.NumberOfViews - 1
If MyPanel.GetView(i) Is EditText Then
Dim MyViewETReset As EditText
MyViewETReset = MyPanel.GetView(i)
MyViewETReset.Text=""
End If
Next
Next