I'm using Boa to reconstruct a simple VB app I'm familiar with, so some of the generated naming should be familiar.
My app has two windows. The first opens to ask for user information. Fill it in, and press a button for generated password results, which pop up in a second window.
As I understand it, in code:
Filename is App1.py
Class is BoaApp
Instance of BoaApp is 'application'
application creates first window:
Expand|Select|Wrap|Line Numbers
- class BoaApp(wx.App):
- def OnInit(self):
- wx.InitAllImageHandlers()
- self.main = Frame1.create(None)
- self.main.Show()
- self.SetTopWindow(self.main)
- return True
My btnGenerate handler (inside Frame1) hides the input window, and creates the 'results' window:
Expand|Select|Wrap|Line Numbers
- def OnBtnGenerateButton(self, event):
- self.Hide()
- results = Frame2.create(None)
- results.Show()
I know what I want to do at this point. I want to hide 'results', show 'main', and destroy 'results' (because 'main' creates a new 'results' each time its button is pressed).
What I can't figure out, from the perspective of the event handler in 'results', is how to reference the name of the hidden Frame1/'main' window to tell it to Show().
My understanding of the hierarchy of the instantiated classes would have me use 'application.main.Show()', based on the names of the instantiated classes, but that doesn't work; nor do dozens of combinations of "self, App1, main, BoaApp, results, parent" or any other pertinent labels I can come up with in my desperation.
I thought I understood the conceptual hierarchy of OO, but I'm either missing something really basic, or my practical interpretation is flawed, or both/worse.
I hope this is enough description to understand exactly what is my point of misunderstanding here. I've been hesitating posting because I didn't want to start a very long back-and-forth of answers not pertaining to a problem I haven't described well enough.
Thanks for reading.