Thanks guys. That solved the problem
···
On Monday, July 2, 2012 5:34:34 PM UTC-4, jskoeh9 wrote:
Hi all,
I am trying to use pubsub to send data back to my main frame from a popup frame upon a button press. The button press hides the popup panel and then sends a message to the main frame via pubsub.
The data is successfully transferred. However, when I exit the GUI, python continues to run as if not all of the windows have closed. When I comment out the pubsub command, press the button, and try to close, the program successfully exits. It is only with the pubsub command that the GUI does not exit completely.
Here is the sending portion of the code:
def OnGenerate(self, event):
Get type of graph user selected
self.type = self.lb_choose_type.GetStringSelection()
if self.type == “Balanced Tree”:
factor = int(self.txt_branch_factor.GetValue())
height = int(self.txt_height.GetValue())
self.G = nx.balanced_tree(factor, height)
self.parent.Show(False)
self.parent.Centre()
Publisher.sendMessage((“Data Generated”))
and the receiving panel:
Publisher.subscribe(self.GetData, (“Data Generated”))
The popup consists of a panel in a “fake popup frame.” This frame’s parent is the main frame.
Any insight as to why the GUI would not close successfully with Pubsub would be much appreciated.
I am running OSX 10.6.8, python 2.7, and wxPython 2.8.12.1.
Thank you
Josh