Any ideas about how to best handle this situation?
I am running Ubuntu 20.04.2 LTS with open jdk 14.0.1. I have the same version of Java on all of my development machines (Windows, Mac, and Linux).
I have several fields (as a B4XViews) embedded in a CLV that do not fire the _FocusChanged event when focus is lost when I click on an ASTabMenu button. Any other loss of focus fires the _FocusChanged event. This only happens on my Linux computer. This issue does not occur on Windows and Mac. The behavior is the same when deployed as when in debug mode over B4J Bridge so I can clearly see where it is failing.
I tried to work around it by calling the _FocusChanged events for the fields in question in the ASTabMenu_TabClick event (see sample code below) but that blows up because the context for the original _LostFocus event is lost. I suppose I could capture the context as an instance of the last field entered in the CLV and then use that in this special case ... maybe.
Here are some relevant code excerpts for one example of one of the CLV Fields.
I am running Ubuntu 20.04.2 LTS with open jdk 14.0.1. I have the same version of Java on all of my development machines (Windows, Mac, and Linux).
I have several fields (as a B4XViews) embedded in a CLV that do not fire the _FocusChanged event when focus is lost when I click on an ASTabMenu button. Any other loss of focus fires the _FocusChanged event. This only happens on my Linux computer. This issue does not occur on Windows and Mac. The behavior is the same when deployed as when in debug mode over B4J Bridge so I can clearly see where it is failing.
I tried to work around it by calling the _FocusChanged events for the fields in question in the ASTabMenu_TabClick event (see sample code below) but that blows up because the context for the original _LostFocus event is lost. I suppose I could capture the context as an instance of the last field entered in the CLV and then use that in this special case ... maybe.
Here are some relevant code excerpts for one example of one of the CLV Fields.
B4X:
Private Sub TextAreaNote_FocusChanged (HasFocus As Boolean)
'Log("Notes Text Focus Changed: HasFocus = [" & HasFocus & "]")
If (HasFocus) Then
'reset flag
blnNotesTextChanged=False
Else if blnNotesTextChanged Then
'Log("Write new text value to database = [" & newNotesText & "]")
Dim noteField As B4XView = Sender
'Log("noteField Tag: " & noteField.Tag)
//Blows up here when called from ASTabMenu1_TabClick
Dim noteFieldTag As Map = noteField.Tag
...
End If
End Sub
...
Private Sub ASTabMenu1_TabClick(index As Int)
'if os is linux call all of the lost focus events
If MainPage.operatingSystem="linux" Then
TextField_Decimal_FocusChanged(False)
TextAreaNote_FocusChanged(False)
TextField_Date_FocusChanged(False)
End If
...
End Sub