2014년 12월 12일 금요일

Question about spinner

I want to make an app with 4 spinners and 4 buttons. Each buttons correspond to each spinners. The elements from strings of each spinners are 500, 1000, 1500 and 2000. So my question is, after chose a value in the spinners and hit buttons, how can I send an SMS which is not 500, 1000, 1500 or even 2000 but 1, 2, 3, 4. I maybe miss something, but I've tried many things and no ones works :/



It would really help if you provided a screenshot of your relevant blocks, so we can see what you are trying to do, and where the problem may be.




Hello, sure, here is my program :) 



I can't study it all right now, but several things immediately jump out at me.

Why are you clearing TinyDB tags on every button click.
The tags you're trying to use for storing values in the TinyDB are wrong./  The tag cannot be a list... only the value can be a list.

You've got a LOT of redundancy in your blocks.  You make the same list twice in every button click.

Please read my tips on redundancy:




Thank you for your help. I know there is a lot of redundancy but as I say I've tried many things :)



Nobody know how to do this method ?



it seems to be you like to send the selection of each spinner?
just use the spinner.selection property to get the selection of a spinner, in your case these are
spinner1.selection
spinner2.selection
spinner3.selection
spinner4.selection

you might want to provide a new screenshot of your relevant blocks...


댓글 없음:

댓글 쓰기