This is only a problem in B4A. In B4J it works. I haven't tried B4i
The problem appears related to checkbox as B4XView not having an mBase attribute.
It is only a problem in debug mode, but it stops execution and the app dies, preventing me from accessing the rest of the app in debug mode.
In two similar xCustomListViews: The one with B4XRadioButtons has no problem. The one with checkboxes as B4XViews dies.
For what it's worth, in both cases the views are also declared in Class_Globals (checkbox as B4XView, radio button as B4XRadioButton).
Any assistance would be greatly appreciated.
The problem appears related to checkbox as B4XView not having an mBase attribute.
It is only a problem in debug mode, but it stops execution and the app dies, preventing me from accessing the rest of the app in debug mode.
In two similar xCustomListViews: The one with B4XRadioButtons has no problem. The one with checkboxes as B4XViews dies.
For what it's worth, in both cases the views are also declared in Class_Globals (checkbox as B4XView, radio button as B4XRadioButton).
This Code Works:
Private Sub rdoItem_Checked
Dim rb As B4XRadioButton = Sender
Dim p1 As B4XView = rb.mBase.Parent
If (rb.Checked) Then
p1.SetColorAndBorder( xui.Color_RGB( 225, 225, 230 ), 4dip, xui.Color_RGB(210, 0, 35), 8dip)
End If
End Sub
This code crashes in debug mode:
Private Sub cbxDiseaseItem_CheckedChange(Checked As Boolean)
Dim cb As B4XView = Sender
Dim p1 As B4XView = cb.parent 'Crashes here. Can't use mBase as it won't compile
If (cb.Checked) Then
p1.SetColorAndBorder( xui.Color_RGB( 241, 215, 177 ), 4dip, xui.Color_RGB(210, 0, 35), 8dip)
End If
End Sub
Any assistance would be greatly appreciated.