linebender/druid

File Open dialog issue

Open

#115 创建于 2019年8月9日

在 GitHub 查看
 (1 评论) (0 反应) (0 负责人)Rust (567 fork)batch import
bughelp wanted

仓库指标

Star
 (9,091 star)
PR 合并指标
 (30 天内没有已合并 PR)

描述

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.

贡献者指南