Android Question Bug ? (edittext seen as label)

advansis

Member
Licensed User
Hi guys, I have a problem while checking the type of a view (don't know if previous versions of B4A are affected, mine is 9.30).

B4X:
Dim T As EditText
    T.Initialize("TXT")
    T.Text="My Text Value"
    Activity.AddView(T,10,10,100,100)
   
    If T Is Label Then
        Log("IS A LABEL")
    End If
The EditText object is recognized as a Label (the LOG says: IS A LABEL) !
It is a problem when using GetAllViewsRecursive in a panel populated at runtime....
Is it a bug or inheritance ? If it is inheritance, please tell me how to replicate this feature, sounds interesting...
OR ELSE: is there any other way for type-checking ?

Thank you
 

ALBRECHT

Active Member
Licensed User
Ok, so with IS instead of GetType,

no way to use the Select case statement ...

to check the Type of Object ?
 

ALBRECHT

Active Member
Licensed User
- perfect, it's better for me.

- in this case also, it s necessary to check the Label at the end, as said Agraham above ?
 
Top