Spinner throws error?

bishmedia

Member
Licensed User
Longtime User
Ive tried looking for a decent answer on the forum but there doesn't seem to be a lot on here about spinners for newbies.

When i click on the spinner i get the following error.........

Can anyone help??

Invalid Double "Midlands Area"

B4X:
Sub AddSpinnerLists
   Spinner1.Add("Midlands Area")
   Spinner1.Add("Butlins Area")
   Spinner2.Add("2013")
   Spinner3.Add("First")
   Spinner3.Add("Third")
End Sub

Sub Spinner1_ItemClick (Position As Int, Value As Object)
   competitionString = Spinner1.GetItem(Value)
End Sub
 

stevel05

Expert
Licensed User
Longtime User
Value is the data returned as an object you should use Position:

B4X:
competitionString = Spinner1.GetItem(Position)

Or assign the returned data directly:

B4X:
CompetitionString=Value
 
Last edited:
Upvote 0
Top