linebender/druid

File Open dialog issue

Open

#115 geöffnet am 9. Aug. 2019

Auf GitHub ansehen
 (1 Kommentar) (0 Reaktionen) (0 zugewiesene Personen)Rust (567 Forks)batch import
bughelp wanted

Repository-Metriken

Stars
 (9.091 Stars)
PR-Merge-Metriken
 (Keine gemergten PRs in 30 T)

Beschreibung

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.

Contributor Guide