C
crystalattice
Not sure how to explain, but I'll try my best. I'm making a GUI with
wxGlade. The GUI has windows that open when the "Next Page" button is
pushed; the button also pickles the information that is input into the
frame at the same time. The saveFile name is autocreated based on the
data entered by the user in the first frame.
Each frame that is created is a new class, e.g. the first frame that
opens is "CharInfo", which opens the frame "Attributes". The pickling
works for the first frame but doesn't work for the ones after.
Apparently the saveFile attribute I created in the "CharInfo" class
isn't carried through to "Attribures", even though it's supposed to be
a subclass.
I've tried several different ways to get it working, such as expressly
calling CharInfo.saveFile, calling CharInfo.pushedButton.saveFile
(saveFile is part of the pushedButton method), calling
Attributes.saveFile, and calling self.saveFile. Every time, I get the
AttributeError message stating saveFile is not an attribute of either
the classes or any function.
The reason I want to keep the same saveFile attribute through every
class is because the initial button in CharInfo creates the file save
name and path; I'd like to have it carried through the rest of the
classes so each new frame will save it's information to the same file.
Is there a way to keep the saveFile "live" throughout the entire
program or would it be better to create a "choose a filename" window at
the end of the program? If the latter, is there anything special I
need to know so the information in each class is pickled correctly?
wxGlade. The GUI has windows that open when the "Next Page" button is
pushed; the button also pickles the information that is input into the
frame at the same time. The saveFile name is autocreated based on the
data entered by the user in the first frame.
Each frame that is created is a new class, e.g. the first frame that
opens is "CharInfo", which opens the frame "Attributes". The pickling
works for the first frame but doesn't work for the ones after.
Apparently the saveFile attribute I created in the "CharInfo" class
isn't carried through to "Attribures", even though it's supposed to be
a subclass.
I've tried several different ways to get it working, such as expressly
calling CharInfo.saveFile, calling CharInfo.pushedButton.saveFile
(saveFile is part of the pushedButton method), calling
Attributes.saveFile, and calling self.saveFile. Every time, I get the
AttributeError message stating saveFile is not an attribute of either
the classes or any function.
The reason I want to keep the same saveFile attribute through every
class is because the initial button in CharInfo creates the file save
name and path; I'd like to have it carried through the rest of the
classes so each new frame will save it's information to the same file.
Is there a way to keep the saveFile "live" throughout the entire
program or would it be better to create a "choose a filename" window at
the end of the program? If the latter, is there anything special I
need to know so the information in each class is pickled correctly?