Button Not Doing an action more then one time?
When I click the first "buy" button, my label ( num1 ) gets from 0 to 1, but if I click again, it doesn't increase more, is it just the button that is made to do one action only one time? I can't figure this out...
Here's the code : http://pastebin.com/dYcAx8Dj
Re: Button Not Doing an action more then one time?
Put a breakpoint in the button handler, press F5 and debug your app. Press the Buy button. Does the bp get hit? When you press the Buy button again, does the bp get hit again?
Btw, what kind of app is this? Winforms app? Asp.net app?
Re: Button Not Doing an action more then one time?
Instead of giving a link to your code, post your code here, in CODE tags. People tend not to click on any link...
Re: Button Not Doing an action more then one time?
From quick look, you are creating a new instance of the Trademan every time the button is clicked, so you always deal with turn == 1.
Re: Button Not Doing an action more then one time?
Windows Form Application, and peoples tend not to like big post and don't have the code option and oohhhh that make sense, thanks everyone.
Re: Button Not Doing an action more then one time?
Quote:
Originally Posted by
MasterMind555
and peoples tend not to like big post and don't have the code option and oohhhh that make sense, thanks everyone.
:thumbd: I didn't ask for your sarcasm dude. I was just trying to let you see that you would get more responses by posting proper code, that's all. Do not come crying next time, when no one helps you - we are not mind readers :mad: :rolleyes: