linebender/druid

File Open dialog issue

Open

#115 ouverte le 9 août 2019

Voir sur GitHub
 (1 commentaire) (0 réactions) (0 assignés)Rust (567 forks)batch import
bughelp wanted

Métriques du dépôt

Stars
 (9 091 stars)
Métriques de merge PR
 (Aucune PR mergée en 30 j)

Description

I'm having issues combining File Open dialogs and timers in the druid-shell hello example.

Currently File Open dialogs block while holding a mutable borrow on the WinHandler until the dialog comes back with a result path. If a timer event triggers while the dialog is open, it panics with "already borrowed".

#95 mentions a possible solution. Are there other solutions to consider?

As a workaround for now I don't block when opening the dialog, immediately returning an Err(Error:Null) in get_file_dialog_path and I have a closure that runs with the actual result but I'm not sure where to send it. If a solution is decided upon I can take a shot at a PR.

Guide contributeur