Wait for window to close?

I have this code:

def EnterQuiz(self):

          import quiz_notes

          quiz_notes.create(self).Show(True)

          self.OnStuEntry()
Basically, I open up another window, enter some data that gets put

in a database, then that window destroy’s itself and it’s back to
the main window. I’m trying to have OnStuEntry() run after
quiz_notes.create(self).Show(True) is finished, but it’s not
happening. Is there a way to wait for the window to close. It
seems like it should, which tells me I don’t know what’s going on.
I’m not having errors, it’s just that I have to rechoose the student
and then everything gets updated.

Showing a new frame does not pause the main app’s execution. Instead, you should use a dialog. It will pause the application appropriately. Or you could use pubsub to send a message back to the main frame to tell it to run “OnStuEntry” when you close the other window. Frames can also be shown modally by using the ShowModal() method. I think that will pause the app just like a dialog will, but you may need to Destroy() the frame if you do that. I don’t remember for sure.

  • Mike