Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 22643 - DirectoryDialog gives same result for My Computer and Cancel
Summary: DirectoryDialog gives same result for My Computer and Cancel
Status: RESOLVED WONTFIX
Alias: None
Product: Platform
Classification: Eclipse Project
Component: SWT (show other bugs)
Version: 2.0   Edit
Hardware: PC Windows 2000
: P3 minor (vote)
Target Milestone: ---   Edit
Assignee: Mike Wilson CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 2196 5717 24122
  Show dependency tree
 
Reported: 2002-08-21 11:28 EDT by Tod Creasey CLA
Modified: 2007-06-08 12:57 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Tod Creasey CLA 2002-08-21 11:28:54 EDT
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
Comment 1 Steve Northover CLA 2002-08-21 11:44:23 EDT
Is MyComputer a directory?  I don't understand.
Comment 2 Tod Creasey CLA 2002-08-21 11:49:34 EDT
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.
Comment 3 Steve Northover CLA 2002-08-22 08:44:07 EDT
Do other Windows apps let you select MyComputer and treat it as "~"?
Comment 4 Tod Creasey CLA 2002-08-22 08:53:17 EDT
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.
Comment 5 Tod Creasey CLA 2002-08-22 10:07:08 EDT
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.
Comment 6 Steve Northover CLA 2002-08-23 09:41:55 EDT
Sorry, I'm setting the right bits in Windows but enabling and disabling the 
dialog button on the fly is not possible.