linebender/druid

File Open dialog issue

Open

#115 opened on 2019年8月9日

GitHub で見る
 (1 comment) (0 reactions) (0 assignees)Rust (9,091 stars) (567 forks)batch import
bughelp wanted

説明

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.

コントリビューターガイド