Wednesday, January 25, 2012

Frustrated

So I really made next to no progress today. I'm trying to get buttons added to the page with the values of the dice on them. When you click on a button, it keeps that die out of the next roll. The problem I am having is setting the number on the buttons. I created the buttons with blank text, later when the dice have been rolled, the program goes back and changes the text to the value of the die. I get an error back when I try to change that text and I don't know why. I try to call the standard setText("1") on the button object, and it tells me that the function setText can only accept one argument and I am passing it two. I don't know what to do with this error, as I am obviously only passing the function one argument. This is exactly like the code that the user manual has, when it tells you how to change the text of the button. So the next step for me is going to be one of two things. I'm going to try googling around and see if someone else has ever had the same problem I'm having. In programming this helps more often than not. Another thing I might try is to just have the buttons go to specific dice and not bother changing the text for right now. So I can get that working and keep the dice out, and later, when I've learned more about the engine, I can go back and add the functionality to say exactly what the values of the dice are. It's been a very frustrating day overall.

No comments:

Post a Comment