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 - on_choose_folder method missing in text #24

Closed cmcknight closed 5 years ago

cmcknight commented 5 years ago

The text does not list the following method:

def on_choose_folder(self, event):
    with wx.Dirdialog(self, 'Choose a directory:',
                      style=wx.DD_DEFAULT_STYLE,
                      ) as dlg:
        if dlg.ShowModal() == wx.ID_OK:
            self.directory.SetValue(dlg.GetPath())

the method is in the repo code though.

driscollis commented 5 years ago

Good point. I will mention it in the book, although since it is the same as the method from the file search utility, I don't think it needs to be reproduced in its entirety.