Community
Participate
Working Groups
The DirectoryDialog returns a result of null for a selection of MyComputer and for the user hitting cancel. As a result it is possible to select My Computer, hit OK and get no result
Is MyComputer a directory? I don't understand.
This is in response to a request for support for user selecting My Computer (on Windows) or ~ on Linux. If these values can't be represented by a path to create a java.io.File than this is a platform limitation but if not then it should be possible to get a meaningful value from them. My Computer is not a directory - I am not sure it can be represented. If not we should at least disable the OK button until a valid directory is chosen.
Do other Windows apps let you select MyComputer and treat it as "~"?
Yes - the windows explorer does. However looking at VisualStudio they just get it wrong and append "My Computer" to the current working directory name. What we have now is already much better than they have.
What we are after is having it so that the DirectoryDialog will only enable to OK button for folders. MyComputer will not give a valid Path anyways so it would be no use for a user to select. If there is a way to open this dialog so that only folders enable the OK button this problem would be solved.
Sorry, I'm setting the right bits in Windows but enabling and disabling the dialog button on the fly is not possible.