In the for loop I'm created 2 instances of a wx.MiniFrame, and 2 menu items.
And the ContainerCallBack tries to "show" each instance. What I get is the same instance shown and hidden.
Someone show me the right way to create multiple instances of a frame dependant on data in a dictionary.
I won't take the time to decipher your code, but will instead lay out the basic principle and let you apply it yourself. Ready? Here it is: In order to access an object later, you need to save a reference to it in a place that is accessible at the point where you need it later. It's as simple as that. Where that place is and what kind of thing it is depends on the needs of your app, how many references you are saving, and how you need to access them later. It's just basic Python.
···
--
Robin Dunn
Software Craftsman http://wxPython.org Java give you jitters? Relax with wxPython!
Robin...
Sometimes the simplest explaination is the best. You explaination was what I've been doing all along,
sticking "things" in dictionaries... I took a look at the code, and simplified it... Thanks for the help!
Works like a champ.
In the for loop I'm created 2 instances of a wx.MiniFrame, and 2 menu items.
And the ContainerCallBack tries to "show" each instance. What I get is the same instance shown and hidden.
Someone show me the right way to create multiple instances of a frame dependant on data in a dictionary.
I won't take the time to decipher your code, but will instead lay out the basic principle and let you apply it yourself. Ready? Here it is: In order to access an object later, you need to save a reference to it in a place that is accessible at the point where you need it later. It's as simple as that. Where that place is and what kind of thing it is depends on the needs of your app, how many references you are saving, and how you need to access them later. It's just basic Python.
--
Robin Dunn
Software Craftsman http://wxPython.org Java give you jitters? Relax with wxPython!