Skip to content

Help me ! #1904

Answered by freakboy3742
YTLoudYN asked this question in Q&A
Apr 26, 2023 · 1 comments · 1 reply
Discussion options

You must be logged in to vote

Why would it be a bool? You're opening a file, so the thing you want to get back is a File (or some sort of file-related object).

In this case, you also need to await the dialog - await window.open_file_dialog(...) to get the file; you'll receive a Pathlib object pointing to the selected file.

If you want an example of using a file dialog, see the dialogs example in the Toga codebase.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@YTLoudYN
Comment options

Answer selected by YTLoudYN
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants