Android Question [Solved] Is posible to know the name of an object by code?


Licensed User
Longtime User
Well, it could be an stupid question, but i didn't found the way of know the name of an object by code.

My case: I'm sharing one event between 4 edittexts with the casting tecnic.
Sub edHour_FocusChanged (HasFocus As Boolean)
    If HasFocus Then
        Dim ed As EditText
        Dim sTag As String
        ed = Sender
        sTag = ed.Tag
        ShowHourDialog(ed, sTag)
    End If
End Sub
As you can see, I'm using the tag to know who rise the event.

No problem, but for me should be easer to know Sender name, becuase if you forget to set tag by code or in design those edits soudn't work properly. For me it's a way to reduce errors in the future if i use this tecnic again.

Thanks and sorry for my english.