driscollis / applications_with_wxpython

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

Chapter 11 - Text Search - main.py - assigning value to preferences and never using preferences #23

Closed cmcknight closed 5 years ago

cmcknight commented 5 years ago

In the create_menu method in main.py there is a line:

    preferences = file_menu.Append(wx.ID_ANY,
                                   'Preferences',
                                   'Open Preferences Dialog')

preferences is not used afterwards, so I'm wondering if the assignment needs to occur or if it can be omitted.

driscollis commented 5 years ago

It should have been used in the Bind statement. Frankly I am surprised the menu item worked without that. I went ahead and fixed it to be consistent though.