Posted 08 January 2013 - 06:32 PM
I made a function that would spawn a button, given the length, height, coordinates(x & y), and so on.
I've been doing this for a few hours, and I still have at least, two bugs:
-If the y-coordinate is greater than or equal to the height, then the whole screen gets filled with the chosen
-If all of the variables (length, width, x-coord) except the y-coord are equal, then it only prints one line, and goes on forever, until it returns "too long without yielding" (I know this is because I don't have a sleep(?)
Please test this out and help me with the bugs. Although this isn't that big of a project nor alot of code, I've never really had to identify bugs and fix them, nor think this hard about (a) project/code
link:http://pastebin.com/GmhH4ABX
Thanks!
I've been doing this for a few hours, and I still have at least, two bugs:
-If the y-coordinate is greater than or equal to the height, then the whole screen gets filled with the chosen
-If all of the variables (length, width, x-coord) except the y-coord are equal, then it only prints one line, and goes on forever, until it returns "too long without yielding" (I know this is because I don't have a sleep(?)
Please test this out and help me with the bugs. Although this isn't that big of a project nor alot of code, I've never really had to identify bugs and fix them, nor think this hard about (a) project/code
link:http://pastebin.com/GmhH4ABX
Thanks!