driscollis / applications_with_wxpython

Code examples for the book, Creating GUI Application with wxPython
https://www.blog.pythonlibrary.org
117 stars 26 forks source link

Book text doesn't match repo code #2

Closed cmcknight closed 5 years ago

cmcknight commented 5 years ago

Chapter 6:

The on_total method in the book (page 69 in ePub) reads:

def on_total(self, event):
    solution = self.update_solution()
    if solution:
        self.running_total.SetLabel('')

but the code in the repo reads:

def on_total(self, event):
    solution = self.update_solution()
    if solution:
        self.solution.SetValue(solution)
        self.running_total.SetLabel('')

The repo code works as expected and updates the solution text control.

More book editing. :-)

driscollis commented 5 years ago

Good catch. Fixed locally. Will push all the book changes tonight