Android Question [B4X] Check view IsNot B4XView or any other type

Alexander Stolte

Expert
Licensed User
Longtime User
So I can check whether something is a certain type:
B4X:
If View Is B4XView Then
but i have often had situations where i have to check whether it is not a certain type, e.g:
B4X:
If xtf_TextBox.IsInitialized = False Or xtf_TextBox.Parent Is Not B4XView Or xtf_TextBox.Parent.IsInitialized = False Then Return

I can also write a function that looks like this, but that is not a nice solution at all:
B4X:
Private Sub IsObjectB4XView(View As Object) As Boolean
    Return View Is B4XView
End Sub

Does the ide have a syntax to achieve this goal?
 
Top