You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have an application that needs to open some data from the user. Currently I am using AppDelegate to listen for druid::commands::OPEN_FILE after using druid::commands::SHOW_OPEN_PANEL.This works great! However, I need to open multiple different data sources that I'd like to store differently in my application state, and there is no way of differentiating which button was pressed once AppDelegate is handling OPEN_FILE.
If druid::commands::OPEN_FILE is fired from a new window, the command's target corresponds with the new window, and I can differentiate the window's source; but I'd like to avoid having every file dialog need to open a new window. This also makes multiple open dialogs from menus impossible.
I would imagine the same problems are present when trying to show two discrete save dialogs in the same window.
The text was updated successfully, but these errors were encountered:
I'm not sure of the "correct" solution, but a workaround would be to have some flag in your application data that you set when SHOW_OPEN_PANEL gets called, that you read when OPEN_FILE gets called.
Yes, this is an oversight. The way I would prefer to solve this is by returning some token when the dialog is requested, and then passing that token back along with the FileInfo struct when that returns.
I have an application that needs to open some data from the user. Currently I am using
AppDelegate
to listen fordruid::commands::OPEN_FILE
after usingdruid::commands::SHOW_OPEN_PANEL
.This works great! However, I need to open multiple different data sources that I'd like to store differently in my application state, and there is no way of differentiating which button was pressed onceAppDelegate
is handlingOPEN_FILE
.If
druid::commands::OPEN_FILE
is fired from a new window, the command's target corresponds with the new window, and I can differentiate the window's source; but I'd like to avoid having every file dialog need to open a new window. This also makes multiple open dialogs from menus impossible.I would imagine the same problems are present when trying to show two discrete save dialogs in the same window.
The text was updated successfully, but these errors were encountered: