bugGNU Octave - Bugs: bug #56800, uigetfile ('MultiSelect', 'on') is...

 
 

bug #56800: uigetfile ('MultiSelect', 'on') is not compatible with "Recent" file dialog feature

Submitted by:  Mike Miller <mtmiller>
Submitted on:  Sat 24 Aug 2019 05:07:10 PM UTC  
 
Category:  Octave Function Severity:  2 - Minor
Priority:  3 - Low Item Group:  Incorrect Result
Status:  Confirmed Assigned to:  None
Originator Name:  Open/Closed:  Open
Release:  dev Operating System:  GNU/Linux

Add a New Comment (Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Thu 29 Aug 2019 07:03:51 PM UTC, comment #4: 

Thank you. So the parent directory of each selected file should be compared before allowing the file selection dialog to return.

Mike Miller <mtmiller>
Project Administrator
Mon 26 Aug 2019 06:23:01 AM UTC, comment #3: 

comment #2:

> Can someone with Matlab describe what this warning message and interaction look like? Does the warning return to the Matlab prompt? Or is the file dialog still shown until the user changes the selection or hits Cancel?
>
> The easiest fix would be for Octave to return an error to the prompt, but maybe it would be better to catch it graphically and allow the user to fix their selection before returning.


I just checked it. As soon as pressing the ok button in the file selection dialog, Matlab throws a warningdlg. After pressing ok in the warningdlg, Matlab returns to the file selection dialog letting the user re-select correctly.


Anonymous
Sat 24 Aug 2019 05:22:12 PM UTC, comment #2: 

Can someone with Matlab describe what this warning message and interaction look like? Does the warning return to the Matlab prompt? Or is the file dialog still shown until the user changes the selection or hits Cancel?

The easiest fix would be for Octave to return an error to the prompt, but maybe it would be better to catch it graphically and allow the user to fix their selection before returning.

Mike Miller <mtmiller>
Project Administrator
Sat 24 Aug 2019 05:13:27 PM UTC, comment #1: 

I just saw this in the Matlab docs for uigetfile

> If a user selects multiple files, then they must be in the same folder; otherwise MATLAB displays a warning dialog box. Microsoft® Windows libraries can span multiple folders.


So maybe we need to change the file selection code to look at the directory for each selected file and make sure they are all the same.

Mike Miller <mtmiller>
Project Administrator
Sat 24 Aug 2019 05:07:10 PM UTC, original submission:  

The uigetfile function with the 'MultiSelect' option enabled fundamentally expects that all selected files will be in the same filesystem directory. The return values from uigetfile are a cell array of file names and a single directory containing all of those files. That is the Matlab API that we are attempting to match.

However, when a user is running in GNOME, the file selection dialog offers a "Recent" files view, which shows a list of files that span multiple directories. In this case, a user may multi-select files in the "Recent" view, but only a single directory will be returned.

I expect that other desktop and windowing environments may offer something similar.

This is a relatively minor issue, but it is definitely possible for a user to select multiple files with this interface and receive misleading return values. This seems to me like a shortcoming in the design of this function.

Example return values:

>> [fname, fpath, fidx] = uigetfile ("MultiSelect", "on")
fname =
{
  [1,1] = hosts
  [1,2] = octave
}

fpath = /home/mike/
fidx = 0

The files selected were actually /etc/hosts and /usr/bin/octave.

Mike Miller <mtmiller>
Project Administrator

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

Attached Files
file #47389:  warningdlg.JPG added by None (14KiB - image/jpeg - warningdlg)

 

Depends on the following items: None found

Items that depend on this one: None found

 

CC list is empty

 

Do you think this task is very important?
If so, you can add your encouragement to it.
This task has 0 encouragements so far.

Only project members can vote.

 

 

 

Follow 4 latest changes.

Date Changed by Updated Field Previous Value => Replaced by
2019-08-29 mtmiller Priority5 - Normal => 3 - Low
    StatusNone => Confirmed
2019-08-26 None Attached File- => Added warningdlg.JPG, #47389
2019-08-24 mtmiller Carbon-CopyRemoved 80942 => -

Back to the top


Powered by Savane 3.5