I’m confused about something very basic. Although I can use a wxMessageDialog to allow a yes or no answer which has results on the main frame, I wanted to try creating my own dialog instead, and am not sure how to do this and have it send anything (data or events) back to the main frame.
The dialog is a class in its own module. When needed in the main frame I import it and use dot notation to create an instance of the dialog and then ShowModal() to show it. There are buttons which when pressed are intended to change things back on the main frame. But how do I do that? If I import the main frame in the dialog module’s code and then make an instance of the main frame, it’s a new instance, and not the originally running instance when I started the app. I wind up with two main frames running and haven’t delivered the data.
The demo for wxDialog mentions basically what I want to do: “The example is very simple; in real world situations, a dialog that had input fields such as this would no doubt be required to deliver those values back to the calling function. The Dialog class supports data retrieval in this manner.” I just don’t understand how the class supports this.
Any help is appreciated.