2014년 12월 7일 일요일

Spinner picking for me! Why?

Ok so i am using three different buttons to call a spinner.
Each button sets the elements of the spinner to their respective lists.
Everything is working fine there.

The problem is the first time one of the buttons are pushed, the .AfterSelecting is being called (with the first element) before i actually select something.
After coming back into the app, the spinner is open with no selection.

Not sure what i am doing wrong.  As usual THANKS FOR THE HELP!!





What I think is strange is that your video selector has a width and height of 1. That means it is not visible. 
Then, your afterPicking handler contains lots of repetitive code. Put it in a procedure with an argument!
And instead of asking for the selection, you could ask for the selection index, which makes it easier to index the other list (I assume that they are both in the same order)



The list picker is set to height/width of 1 for a reason, this allows it to be invisible while i use a button to call it.  That way i can set the image of the button(which you cannot do to a spinner)
And yes i realized that i could use the selected index, which is changed in the code.
But that still does not help me answer the question, why is it being called and selecting the first option without being prompted? 



same thing different set of blocks, any ideas



I replaced the spinner with a new spinner and it works.  So i am not sure what exactly was the problem.  I made a new spinner but used all the same blocks from the old one?


댓글 없음:

댓글 쓰기