Can someone explain to a non-C++ and new-to-Python programmer how to implement the concept of PushEventHandler? Slowly, as if to a child, because every attempted explanation I've seen so far only seems to re-iterate exactly what it says in the wxWindows Reference (which I quite obviously don't understand).
Frankly, words with an Asterisk after* them, double colons :: and arrows just confuse me. Python is my first and only programming language/experience so far and I just don't have the background to understand this, I guess.
Actually, PushEventHandler may not even be the proper solution for my problem.
I'm trying to implement a simple interface similar to MS Outlook. Its a Frame containing a SplitWindow . The left-hand panel is narrow and holds a notebook (which will ultimately hold the icons to launch various modules). The right-hand panel is going to be the main work area.
My problem is that I would like to structure this program so that seperate scripts are used for each "module" the program launches. Each imported module is to contain the panel(s) to display, a menubar definition, and a toolbar definition, and all the event definitions for the menu. Obviously, when selected, I need to set the Main_Frame.MenuBar and ToolBar. What I can't manage is to get the menu items to trigger event handling in the imported module instead of just looking in the Main_Frame script.
I'm assuming the PushEventHandler function can solve this, but I don't understand the documentation well enough to implement it.
PushEventHandler(wxEvtHandler* handler)
Where does the command itself go? In the function that imports the script or in the script to be imported? And, what does "wxEvtHandler* handler" mean? Is it looking for
the imported panel class name (i.e. Class imported (args) ),
the instantiated panel class name (i.e. instantiated = imported() ),
the imported script name,
a global variable name,
parent window name,
parent frame name,
etc.?
Can someone translate this to something like:
FunctionCallingTheScript.PushEventHandler(InstantiatedNameOfMainFrameClass)
or whatever the correct implementation would be?
And, is that all there is to it, or do I have to prep something in the script-to-be-called, as well?