I have a Form and I want to set Blank ("") value into all B4XFloatTextFields.
I try this code
B4X:
For Each n As Node In f.RootPane.GetAllViewsRecursive
If n Is B4XFloatTextField Then
Dim nJo As JavaObject = n
nJo.runmethod("setText",Array(""))
End If
Next
But I am getting this error
Compiling generated Java code. Error
B4J line: 878
If n Is B4XFloatTextField Then
src\rtm\b4j\arap\main.java:2290: error: incompatible types: Node cannot be converted to b4xfloattextfield
if (_n.getObjectOrNull() instanceof b4xfloattextfield) {
^
1 error
For Each n As B4XView In f.RootPane.GetAllViewsRecursive
If n Is TextField Then
Dim nJo As JavaObject = n
nJo.runmethod("setText",Array(""))
End If
Next
For Each n As B4XView In f.RootPane.GetAllViewsRecursive
If n.Tag Is B4XFloatTextField Then
Dim txt As B4XFloatTextField = n.Tag
txt.Text = ""
End If
Next
For Each n As B4XView In f.RootPane.GetAllViewsRecursive
If n.Tag Is B4XFloatTextField Then
Dim txt As B4XFloatTextField = n.Tag
txt.Text = ""
End If
Next