bugGNU Octave - Bugs: bug #48828, uigetfile issues

 
 

bug #48828: uigetfile issues

Submitter:  Philip Nienhuis <philipnienhuis>
Submitted:  Fri 19 Aug 2016 02:59:41 PM UTC
   
 
Category:  Octave Function Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Incorrect Result
Status:  Fixed Assigned to:  philipnienhuis
Originator Name:  Philip Nienhuis Open/Closed:  * Closed
Release:  * dev Operating System:  * Any
Fixed Release:  None Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Mon 22 Aug 2016 09:16:08 PM UTC, comment #2: 
Philip Nienhuis <philipnienhuis>
Group Member
Fri 19 Aug 2016 03:04:23 PM UTC, comment #1: 

Here is the cset.
If no one objects or beats me to it, I'll push it next Monday Aug. 22nd

(file #38280)

Philip Nienhuis <philipnienhuis>
Group Member
Fri 19 Aug 2016 02:59:41 PM UTC, original submission:  

Unlike Matlab, uigetfile does not allow a subdirectory name as input argument. When trying anyway, a first bug pops up:

>> [a, b, c] = uigetfile ('c:\users')
error: 'retval' undefined near line 66 column 18
error: called from
    __file_filter__ at line 66 column 42
    uigetfile at line 99 column 33


(Above on Windows but similar on Linux)
That is due to a type on scripts/gui/private/__file-filter__.m

Fixing that and trying again, the next bug pops up:

>> [a, b, c] = uigetfile ('c:\users')
error: retval(1,_): but retval has size 0x0
error: called from
    __file_filter__ at line 66 column 42
    uigetfile at line 99 column 33


due to not checking for empty retval before indexing it.

When all this has been fixed uigetfile can also use directory names of path names as input arg. I'll attach a cset as soon as I have the bug number.

Unlike Matlab, whose docs mention that directory names should end with a filesep, I didn't bother to check for that in the patch. If no trailing filesep is present uigetfile displays the parent dir with the lowest dir (to the right of the rightmost filesep) highlighted (if present) or nothing highlighted if no match is found.

Philip Nienhuis <philipnienhuis>
Group Member

 

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

Attach Files:
   
   
Comment:
   

Attached Files
file #38280:  bug48828_uigetfile.cset added by philipnienhuis (2KiB - application/octet-stream)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by philipnienhuis (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only group members can vote.

     

    Follow 4 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2016-08-22 philipnienhuis StatusReady For Test Fixed
        Open/ClosedOpen Closed
    2016-08-19 philipnienhuis Attached File- Added bug48828_uigetfile.cset, #38280
        StatusNone Ready For Test

    Back to the top

    Powered by Savane 3.13-02a9.
    Corresponding source code