|
-
June 6th, 2011, 05:23 PM
#1
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
-
June 6th, 2011, 11:35 PM
#2
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?
-
June 7th, 2011, 02:00 AM
#3
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...
-
June 7th, 2011, 04:12 AM
#4
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.
- Make it run.
- Make it right.
- Make it fast.
Don't hesitate to rate my post. 
-
June 7th, 2011, 03:53 PM
#5
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.
-
June 8th, 2011, 01:00 AM
#6
Re: Button Not Doing an action more then one time?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|