dhernandez Active Member Licensed User Longtime User Dec 9, 2014 #1 Good day to all. I have a question. How do I go about selecting an item of a Spinner from a variable? Currently I do this: B4X: Dim Valor1 as string Valor1=Cursor1.Getstring("Col1") ListaValor.SelectedItem(Valor1) Generates an error when trying to run it
Good day to all. I have a question. How do I go about selecting an item of a Spinner from a variable? Currently I do this: B4X: Dim Valor1 as string Valor1=Cursor1.Getstring("Col1") ListaValor.SelectedItem(Valor1) Generates an error when trying to run it
NJDude Expert Licensed User Longtime User Dec 9, 2014 #2 A couple of things: 1- Is the Valor1 variable numeric? 2- What's the error? Upvote 0
dhernandez Active Member Licensed User Longtime User Dec 9, 2014 #3 thnks... 1.- Is String 2.- B4X: Parsing code. 0.03 Compiling code. Error Error compiling program. Error description: Array expected. Occurred on line: 95 ListaValor.SelectedItem(Variables.EP_VALOR) Word: ( In that line the error Upvote 0
thnks... 1.- Is String 2.- B4X: Parsing code. 0.03 Compiling code. Error Error compiling program. Error description: Array expected. Occurred on line: 95 ListaValor.SelectedItem(Variables.EP_VALOR) Word: ( In that line the error
NJDude Expert Licensed User Longtime User Dec 9, 2014 #4 The syntax for SelectedItem is wrong, it's read only, you should be using SelectedIndex Upvote 0
dhernandez Active Member Licensed User Longtime User Dec 9, 2014 #5 I need to do it that way, because the value displayed by the Spinner, always depend on other value in the database. Upvote 0
I need to do it that way, because the value displayed by the Spinner, always depend on other value in the database.
NJDude Expert Licensed User Longtime User Dec 9, 2014 #6 SelectedItem only READS the spinner SelectedIndex READS/SETS the spinner Upvote 0
thedesolatesoul Expert Licensed User Longtime User Dec 10, 2014 #7 @dhernandez just commenting to appreciate your avatar. Very nice! Upvote 0
dhernandez Active Member Licensed User Longtime User Dec 10, 2014 #8 OK, I understand. @NJDude, Very thks for your help. @thedesolatesoul jijii thks Upvote 0