New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
If you add in self.setStopFunction(f)
, the program will not end unless f()
contains some form of sys.exit(0)
#521
Comments
I would like a way to run statements after app.launch(), specifically restart the app. If you have any suggestions regarding this process (considering that I can't exit cleanly with a stop function...). |
And calling |
The purpose of Have you tried the code here: http://appjar.info/pythonEvents/#stopping-the-gui I've just given it a quick test, and it seems to be working.
Here's the code I used: from appJar import gui
def checkStop():
return app.yesNoBox("Confirm Exit", "Are you sure you want to exit the application?")
with gui('Stop test') as app:
app.label('Stop Test')
app.stopFunction = checkStop
app.button('quit', app.stop) |
As to your question about running functions where the GUI starts, there is a corresponding You use this in the same way, registering a function that will be called once the GUI has started... |
And, getting the program to run again once it's closed, you could try putting it in a infinite loop, although I'm not sure how that will work out... Alternatively, just have the |
Thank you! Return true, got it. |
I've updated the docs :) |
See subj. line
The text was updated successfully, but these errors were encountered: