Skip to content
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

Define application lifecycle events by subclassing #2678

Merged
merged 11 commits into from
Jun 28, 2024

Conversation

freakboy3742
Copy link
Member

@freakboy3742 freakboy3742 commented Jun 27, 2024

  • Modifies the handling of on_exit so that it can be defined by subclassing, in addition to assigning an on_exit attribute
  • Modifies the running entry point added by Add support for background and session-based apps #2651 to be named on_running (reflecting it's status as a lifecycle event), following the same pattern as on_exit.
  • Deprecates app.add_background_task().

Fixes #2099.

PR Checklist:

  • All new features have been tested
  • All new features have been documented
  • I have read the CONTRIBUTING.md file
  • I will abide by the code of conduct

changes/2099.removal.rst Outdated Show resolved Hide resolved
changes/2678.feature.2.rst Outdated Show resolved Hide resolved
docs/reference/api/app.rst Outdated Show resolved Hide resolved
core/src/toga/app.py Show resolved Hide resolved
freakboy3742 and others added 2 commits June 28, 2024 05:50
@mhsmith mhsmith merged commit 9a62c51 into beeware:main Jun 28, 2024
32 of 35 checks passed
@freakboy3742 freakboy3742 deleted the on-running branch June 28, 2024 10:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Document passing arguments to event handlers
2 participants