For Each n As Node In MainForm.RootPane.GetAllViewsRecursive
' i would like to use a combination of subExists and callsub
If n Is TextField Or n Is TextArea Then
callsub2(n,"setText","")
End If
Next
The first error is that the IDE says that there is not sub with that name
Second is that it fails, it mentions that textfield cannot be converted to string.
ducktyping only works for Classes created within the IDE?
right now i am using javaObject:
B4X:
For Each n As Node In MainForm.RootPane.GetAllViewsRecursive
If n Is TextField Or n Is TextArea Then
Dim nJo As JavaObject = n
nJo.runmethod("setText",Array(""))
End If
Next