Android Question B4XComboBox in StateManager class

peacemaker

Expert
Licensed User
Longtime User
Hi, All

B4X:
Sub innerSaveState(v As View, list1 As List)
    Dim data() As Object
    If v Is EditText Then
        Dim edit As EditText
        edit = v
        data = Array As Object(edit.Text, edit.SelectionStart)
    Else If v Is Spinner Then
        Dim spinner1 As Spinner
        spinner1 = v
        data = Array As Object(spinner1.SelectedIndex)
    Else If v Is B4XComboBox Then
        Dim B4XView As B4XComboBox
        B4XView = v      ' HERE IDE SHOWS ERROR: Types do not match
        data = Array As Object(B4XView.SelectedIndex)

How to fix ?
 

Attachments

  • StateManager.bas
    7.2 KB · Views: 394

peacemaker

Expert
Licensed User
Longtime User
upload_2018-10-18_18-55-53.png
 
Upvote 0

peacemaker

Expert
Licensed User
Longtime User
Erel, you are again right :)
During making a small project i have found that the SaveState module works with B4Xcombobox OK with no changes.
So, my project mistake was proved :)

Debug algorithm is the same any time ;)
 
Upvote 0
Top