I have a segmented control that adds or removes selection option rows:
In the SegmentControl, I either display a new row or remove the current row depending on what the user clicks:
Select Case Index
Case 1
If SegmentIndex = 0 Then
wpMain.pmType(2).Enabled = True
wpMain.pmType.Visible = True
wpMain.pmSize(2).Enabled = True
wpMain.pmSize(2).Visible = True
wpMain.sgAddRemove(2).Enabled = True
wpMain.sgAddRemove(2).Visible = True
wpMain.sgAddRemove(2).Enabled = False
Else
End If
Case 2
If SegmentIndex = 0 Then
pmType(3).Enabled = True
pmType(3).Visible = True
pmSize(3).Enabled = True
pmSize(3).Visible = True
sgAddRemove(3).Enabled = True
sgAddRemove(3).Visible = True
sgAddRemove(3).Enabled = False
Else
End If
Case 3
If SegmentIndex = 0 Then
pmType(4).Enabled = True
pmType(4).Visible = True
pmSize(4).Enabled = True
pmSize(4).Visible = True
sgAddRemove(4).Enabled = True
sgAddRemove(4).Visible = True
sgAddRemove(4).Enabled = False
Else
End If
Case 4
If SegmentIndex = 1 Then // only option is remove this row
End If
End Select
Everything looks correct and autocomplete works for the control arrays. However, when I run the code, that first entry for pmType(x).enabled always returns Nil. Also, if I remove the Action event for the SegmentedControl, it works without errors.
This is occurring under 21r1.1 and 19r3.2, so I don’t believe that it is a Web API version issue.
Thoughts?