Announcement

Collapse
No announcement yet.

Problem with SelectedSubTriggerIndex

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Problem with SelectedSubTriggerIndex

    I found a bug in the VB sample code related to creating sub triggers.

    From the original source (SampleTriggerType.vb):
    Code:
    Protected Overrides Property SubTriggerTypeNames As List(Of String) = New List(Of String) From {
        "Button click with X options checked",
        "Button click with specific option checked",
        "Button click with no options checked",
        "Button click with any options checked"
    }
    This fails at runtime. The value for SelectedSubTriggerIndex won't be correctly set.

    Changing the definition to this fixes the problem:
    Code:
    Protected Overrides Property SubTriggerTypeNames As List(Of String)
        Get
            Return New List(Of String) From {
                "Button click with X options checked",
                "Button click with specific option checked",
                "Button click with no options checked",
                "Button click with any options checked"
             }
        End Get
        Set(value As List(Of String))
        End Set
    End Property
    I hope this saves somebody the couple of hours of troubleshooting it took me!
Working...
X