linebender/druid

File Open dialog issue

Open

#115 aberto em 9 de ago. de 2019

Ver no GitHub
 (1 comment) (0 reactions) (0 assignees)Rust (567 forks)batch import
bughelp wanted

Métricas do repositório

Stars
 (9.091 stars)
Métricas de merge de PR
 (Nenhuma PRs mesclada em 30d)

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.

Guia do colaborador