I have a layout with several WebViews, each containing html with a link. Clicking a link triggers the LocationChanged event just fine. However, I can't figure out how to get which WebView the click happened in, as Sender is Null. Is this expected behaviour on B4J or have I misunderstood something?
Logging the Sender shows it's Null.
And casting as WebView obviously then gives error
B4X:
Public Sub webContent_LocationChanged (Location As String)
Log("Location changed: " & Location)
Sleep(0)
Log(Sender)
Sender.As(WebView).LoadHtml("<h1>Beep boop</h1>")
End Sub
Logging the Sender shows it's Null.
And casting as WebView obviously then gives error
B4X:
java.lang.RuntimeException: Object should first be initialized (WebView).