Error when call OpenFileDialog on osx and linux
See original GitHub issueWhen I load OpenFileDialog on osx and Ubuntu, it has some problem. I use the following code to load OpenFileDialog:
var task = Task.Run(() =>
{
OpenFileDialog openFileDialog = new OpenFileDialog
{
AllowMultiple = true
};
var outPathStrings = openFileDialog.ShowAsync();
return outPathStrings;
});
var filelistStrings = task.GetAwaiter().GetResult();
It works normal on Windows. But when I run it on osx, it shows you are calling a method that can only be invoked from the UI thread
. And on Ubuntu, it says GtkDialog mapped without a transient parent. This is discouraged.
. And they all have no more response.
I think it may be because I did not load a MainWindow. I use the following code to start the application:
var app = new Application();
AppBuilder.Configure(app)
.UsePlatformDetect()
.SetupWithoutStarting();
I want to know what is the actual reason for the problem and if I can use some way to avoid the problem.
Issue Analytics
- State:
- Created 5 years ago
- Comments:10 (7 by maintainers)
Top Results From Across the Web
"Answer File" open file dialog not working for Mac Build
I notice that the "Answer File" no longer works in my Mac build, which I made for the Mac App Store. I'm not...
Read more >What could cause an open file dialog window in Tkinter ...
The dialog goes away for me. When the dialog shows up, are you clicking on the "open" button? Clicking on "open" or double-clicking...
Read more >macos - Enter a filename in the File Open dialog
I tried just typing into an open dialog but it will just try to "Go to a folder", it won't accept a full...
Read more >Crash during open file dialog when trying to upload a file
2.In the file dialog window that pops up, navigate to a directory and/or select a file to upload 3.Chrome crashes with a segmentation...
Read more >"Open File" dialog box takes a long time to appear on all ...
The problem turned out to be the shared drives: The file dialog process scans the shared drives before showing the file dialog window....
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@grokys I think we should make
window
parameter here mandatory. Right now it’s too error-prone to use, since not passing the parent window is too forgiving on Win32 which is the most common developer platform.It’s fine to pass
null
aswindow
, just don’t expect the dialog to show at any meaningful location (like on top of your window).