Jump to content

File Dialog oddity


Recommended Posts

I am trying to understand an odd behavior of the File Dialog Express VI which I tend to use in most of my UIs.

The snippet below provides an illustration of what I am discussing next:

376775259_FileDialogOddity.png.7c989524b29aa30a2ed0e7e64c8eb2f2.png

Generally, I will pick an existing file path for start path and either a default name, or one that makes sense in the context for name or relative path.

Here an hdf5 file extension is added to/replaced in that template (but this is irrelevant) and the resulting (generally) non-existing file path is fed to the File Dialog Express VI (configured to accept single file path, new or existing files) as a two part input:

- start path defined in the Help as:

Path of the directory (my emphasis) whose contents LabVIEW initially displays in the dialog box. If start path is valid, but does not refer to an existing directory, LabVIEW strips names from the end of the path until the path is a valid directory path or an empty path. If start path is invalid or unwired, the last directory viewed in a file dialog box initially appears in the dialog box.

- default name defined in the Help as:

Name you want to appear as the initial file or directory name (my emphasis) in the dialog box. The default is an empty string.

The strange behavior I am observing is that:

(i) if the user accepts the proposed path, it is passed along right away (that is not the strange part), but

(ii) if she/he/they move up one folder and press OK, the dialog will pop-up again and essentially refuse the proposed path (this is the strange part). If the user presses OK, the path is of course accepted as we are back in case (i).

(iii) The only way to achieve what step (ii) is supposed to do is to move up TWO folders, then press OK once (which brings the dialog back up) and then once again.

Any idea why this would make any sense or whether this qualifies as a bug?

 

PS: obviously the above are just preliminary steps to creating/opening a file and saving data in it, but this is irrelevant to the discussion.

Link to comment
1 hour ago, X___ said:

The strange behavior I am observing is that:

(i) if the user accepts the proposed path, it is passed along right away (that is not the strange part), but

(ii) if she/he/they move up one folder and press OK, the dialog will pop-up again and essentially refuse the proposed path (this is the strange part). If the user presses OK, the path is of course accepted as we are back in case (i).

(iii) The only way to achieve what step (ii) is supposed to do is to move up TWO folders, then press OK once (which brings the dialog back up) and then once again.

Any idea why this would make any sense or whether this qualifies as a bug?

Perhaps I'm missing something, but the way this works is when you move up one folder, that folder is "selected", so pressing OK will open the folder again. What makes it confusing is that the filename (and not the folder) is highlighted active (blue and not gray), so a user might think that pressing OK will confirm the filename, which is not the case. To my knowledge there is no way to change this behavior in Windows (the dialog is not actually part of LV).

By the way, even if you deselect the folder, it will still enter the previous folder, which is certainly not intuitive to most users (including myself). The only way to make it work is to "change" the filename (even just replacing one character with the same letter will do the job).

Here are the different scenarios I tested:

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.