Neil Dugan wrote:
Hello Dare,

Here is one way, that works. The main problem with the way you had the code structured, is that the 'value' variable in get_spin() and the 'value' variable in main() where two different things.

Separating the two windows into separate classes, makes it is easy to make sure that there is only one 'value' variable. And the code becomes easier to understand. As in the main window class it is obvious (see print_value()) that we are refereing to the variable set by the spin_window() class.

Hope this helps.

Neil.
Much thanks to you Neil! This should put me 'back on track' with my code! I had already spent a long time scouring with Google to find examples of 'spinbutton' that were easy enough for me to understand. I had been confident that I could easily 'pick up' a new language like Python (and PyGTK) -- especially with all the resources on the Net -- but it has been more difficult than I imagined. Now that I have discovered this mailing list, hopefully I will not 'spin my wheels' so much before asking for help! :)

Dare
_______________________________________________
pygtk mailing list   [email protected]
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/

Reply via email to