Closed cmcknight closed 5 years ago
Actually open_wildcard
is defined outside of the classes right after the imports at the top of the file. So self.open_wildcard
would be undefined.
Hm, okay. It's a bit unclear where to put it in the text then. (see excerpt below):
“Copy the code from the previous example and paste it into a new a file called archiver_gui2.py. Instead of reproducing the entire file here again, in this section you will focus on what has changed. You will be only editing the MainFrame class to add a menu.
Let’s start by modifying the constructor:
1 open_wildcard = "All files (*.*)|*.*"
2 ”
You are quite right. That is confusing. I will get that fixed ASAP
In the book text the code reads:
but line 6 has an undefined variable (open_wildcard). The correction would be to modify the code to put self in front of the variable (see below):