Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
This repository was archived by the owner on Dec 25, 2025. It is now read-only.

Update app-exit-confirm-dialog.py #167

Open
non-npc wants to merge 1 commit into flet-dev:main
base: main
Choose a base branch
Loading
from non-npc:patch-15

Conversation

@non-npc
Copy link
Contributor

@non-npc non-npc commented Sep 12, 2024

Resolves the following deprecation errors:
window_prevent_close()
dialog()
window_destroy()

Resolves the following deprecation errors:
window_prevent_close()
dialog()
window_destroy()
page.add(Text('Try exiting this app by clicking window\'s "Close" button!'))


flet.app(target=main)
Copy link
Contributor

@ndonkoHenri ndonkoHenri Sep 12, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why two lines to run the app?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good catch!, copy paste typo! eek!


def yes_click(e):
page.window_destroy()
# Use the updated method to destroy the window
Copy link
Contributor

@ndonkoHenri ndonkoHenri Sep 12, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No need to add comments in this case.

non-npc reacted with thumbs up emoji
def window_event(e):
if e.data == "close":
page.dialog = confirm_dialog
# Use the updated method to append the dialog to the overlay
Copy link
Contributor

@ndonkoHenri ndonkoHenri Sep 12, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No need for this comment too.

non-npc reacted with thumbs up emoji
Copy link
Contributor

@non-npc, thanks again for your contirbutions.

While on this, could you equally update the code you work on to use import flet as ft instead of importing each Control?

non-npc reacted with thumbs up emoji

Copy link
Contributor Author

non-npc commented Sep 12, 2024

@non-npc, thanks again for your contirbutions.

While on this, could you equally update the code you work on to use import flet as ft instead of importing each Control?

absolutely going forward I will do this.
Thank you for making a wonderful python library.

ndonkoHenri reacted with thumbs up emoji

Copy link
Contributor

Thank you for making a wonderful python library.

@FeodorFitsner 🫡

non-npc reacted with thumbs up emoji

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Reviewers

1 more reviewer

@ndonkoHenri ndonkoHenri ndonkoHenri left review comments

Reviewers whose approvals may not affect merge requirements

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

AltStyle によって変換されたページ (->オリジナル) /