Computer Science Canada Ok. I'm stupid but I still need "EXPERTS" help. |
Author: | sixjuwel [ Wed Dec 29, 2004 3:30 am ] |
Post subject: | Ok. I'm stupid but I still need "EXPERTS" help. |
![]() when you run this one you can choose the menues ok. follow this step 1. click "AND GATE" first, and turn on the side button 1 and 2 2. and click start button(animation will be playing) 3. click "Clear button" You will see the menu on the top of the window 4. click " OR GATE" next, and do step 1 &2 As you can see, they doesn't make compatibillity. why does it happen? plz fix this... ![]() (I think I need to disable the first one after use...) |
Author: | McKenzie [ Wed Dec 29, 2004 9:42 am ] | ||
Post subject: | |||
I'd love to help but you have gone out of your way to make your code hard to read. One of the points that your teacher should have told you when teaching proper coding style is that if you use horrible style no one will want to look at your code. Come on Quote:
and the only comments you have are all but useless |
Author: | sixjuwel [ Wed Dec 29, 2004 1:42 pm ] |
Post subject: | oh... sorry |
so sorry haha humn.... first fool - it's box when the animation finished (ai,mega,whwh) are same thing stupid- this is simulation for AND GATE (what, which, how) are same I think those are ..... things... plz help me... |
Author: | McKenzie [ Thu Dec 30, 2004 10:28 am ] | ||
Post subject: | |||
Those are just some of the examples of poor name choices.
I could find loads of others. I've done something similar before. You start working on a program and as a way of saying "ha, I'm so good that I don't need proper variable names or comments. Stupid teacher." you go out of your way to use poor style. The problem is the code becomes painfull to look at. You need to go through add comments and change most of your variable and subroutine names, heck even the name of the program. If you do that, repost the new version and I'll look at it. |
Author: | McKenzie [ Thu Dec 30, 2004 10:56 am ] |
Post subject: | |
OK, despite the heartfelt lecture I took a closer look at your code. On top of poor naming and poor comments you also have a a resource leak. The resource leak is not the reason your program doesn't work but it's related. In sidebutton/sidebutton1 you keep making new buttons, but you never dispose of them. Whichever Start button you make first will always be on top and the only one you can click on. Two ways to fix this. 1. Dispose of your old buttons before making new ones. 2. Make all of your buttons globaly and use GUI.Show/GUI.Hide to control them |