How can I filter out the "My Computer"-option in a SWT DirectoryDialog?
in our Eclipse RCP applicat开发者_如何学编程ion running on Windows XP we use a DirectoryDialog, in which the user should... ahmm... choose a directory! :D
The problem is: If the user selects the "My Computer"-option (in German Windows "Arbeitsplatz") the Dialog returns null.
The DirectoryDialog provides a method setFilterPath(String path) in which I put the File.pathSeparatorChar (to remain OS-independant).
My suggestion was that if there has to be a file separator in the directory the "My Computer"-option would be ignored cause it is null - for example the "OK"-button would be greyed out or sth. like that... but it is also valid to klick "OK".
Any suggestions from your side? :D
Thanks in advance!
Alex
My Computer
is not a directory, so I think it's fine for the OK
button to be gray.
精彩评论