Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » Windows 7 Directory Dialog Issues(DirectoryDialog)
Windows 7 Directory Dialog Issues [message #729730] Mon, 26 September 2011 16:56
Kevin Lillybridge is currently offline Kevin Lillybridge
Messages: 1
Registered: September 2011
Junior Member
Hello,

I was wondering if anyone has heard of this issue or point me in the right direction.

I'm attempting to create a DirectoryDialog for a desktop program I'm creating. Please note I'm using Windows 7.

I can create the dialog box just fine. Once the box is displayed my users will usually select the "make new folder" button to create a new folder.

index.php/fa/4064/0/

After the user selects the "make new folder" button they usually edit the name of the folder from the directory tree window.

index.php/fa/4065/0/

When this happens, after the "Ok" button is selected the name of the new folder is never updated. For example, the user changes the name of the new directory to "kevin is cool" but the text box still says "New Folder ()". Then the user gets a null pointer because the program cant find anything called "New Folder ()". The one caveat to this is if you wait a minute the program will eventually take the name and all will be well. But if you perform this operation quick enough it doesnt work. You get the null pointer. Here's my code as well.

DirectoryDialog dialog = new DirectoryDialog(getShell());
dialog.setText("Select the directory in which to unpack the release package.");
dialog.setMessage("The downloaded release package will be downloaded and "
+ "unpacked in the directory you choose. The directory you choose must be empty.");

boolean success = false;

while (success == false) {
downloadDirectory = dialog.open();

if (downloadDirectory == null) {
cancelled = true;
break;
}

Any idea of how to fix this issue or is this just a but with SWT and Windows 7?

Thanks in advance for the help.

Kevin
  • Attachment: capture1.PNG
    (Size: 32.75KB, Downloaded 753 times)
  • Attachment: Capture.PNG
    (Size: 34.85KB, Downloaded 703 times)
Previous Topic:Why isn't key released event sent when two keys are pressed?
Next Topic:Layout label and combo in fixed size window
Goto Forum:
  


Current Time: Wed Apr 16 21:06:45 EDT 2014

Powered by FUDForum. Page generated in 0.19666 seconds