LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Use DirSelectPopup to select a new directory

I'm using DirSelectPopup allowing the user to create a new directory:
nSelectStatus = DirSelectPopup (sDefaultDir, "Select Directory", 1, 1, sDataFilePath));
If the user creates a new directory and renames it, DirSelectPopup doesn't see the new name until it rereads the directory. The following sequence should describe my problem.
1. Call DirSelectPopup.
2. Click on the New Folder icon in the file dialog box.
3. Enter a new name for the folder, e.g. TempData.
4. Double click on TempData to select it.
An error message pops up: "New Folder is not accessible. The folder was moved or renamed." Here, "New Folder" is the default name assigned before the user renamed it. The directory listing shows the new name, TempData, but
DirSelectPopup still thinks the user is trying to select the original name.
5. Click OK.
6. Browse to TempData and double click on it to select it. No error occurs.

Here's an alternate to avoid the error:
1. Call DirSelectPopup.
2. Click on the New Folder icon in the file dialog box.
3. Enter a new name for the folder, e.g. TempData.
4. Press F5 to refresh the directory listing.
5. Browse to TempData and double click on it to select it. No error occurs.

I don't like either method (error then try again or refresh then select). Why can't the user directly select the new directory immediately after it was renamed?

I'm using Windows 2000 Service Pack 2 and CVI 6.0.0 (105).
0 Kudos
Message 1 of 2
(3,333 Views)
I had a similar problem with File SelectPopup: even if the Create File flag is set to False, the user is stil able to create a new file right clicking and selecting New...

When I asked NI technical support if it were possible to inhibit this behaviour, they answered me that these are OS windows, and some of their features lie beyond CVI control.

For this reason I see no solution to your problem, but if you find some, I'll be glad to know too.

Roberto


Proud to use LW/CVI from 3.1 on.

My contributions to the Developer Community
________________________________________
If I have helped you, why not giving me a kudos?
0 Kudos
Message 2 of 2
(3,333 Views)