bugGNU Octave - Bugs: bug #55065, Implement uiopen and uisave

 
 

bug #55065: Implement uiopen and uisave

Submitter:  Rik <rik5>
Submitted:  Tue 20 Nov 2018 10:58:34 PM UTC
   
 
Category:  Octave Function Severity:  1 - Wish
Priority:  5 - Normal Item Group:  Feature Request
Status:  Patch Submitted Assigned to:  None
Originator Name:  Open/Closed:  * Open
Release:  * dev Operating System:  * Any
Fixed Release:  None Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Jump to the original submission

Thu 23 Mar 2023 08:49:38 PM UTC, comment #8: 

For an example of using temporary files in a BIST test see copyobj.m and look for "tempname".  It is all inside of an unwind_protect block so that the temporary files are cleaned up even if something goes wrong with the test.

Rik <rik5>
Group administrator
Thu 23 Mar 2023 06:59:04 PM UTC, comment #7: 

@ristephens, these are actually in pretty good shape. a couple initial thoughts:

uisave:
while i like the fact that applying an empty array as a placeholder for the variable names (  uisave([], "filename") allows you to save all variables without specifying them but still pre-name the file, i noticed that matlab doesn't behave this way. if you pass [] as the variable names, it gives you a "no variables to save" error.

whenever you don't specify a variable (either by uisave() or by the syntax above with []), an "ans" variable is created in the workspace that appears to be a cell array containing the variables saved to the file. This probably should be suppressed somehow. (Matlab's function doesn't change anything in the workspace.)

Last, while both programs give you an error if you specify a variable that doesn't exist, your uisave still creates an empty mat file. (well, it is empty of variables. it contains the "# Created by Octave ..." header line)

uiopen - no issues i could see with a quick check and a few tests. for this file, since there's a user-interaction free syntax, maybe it would be possible to write a few BISTs that create a few workspace variables then writes them to a mat file and uiopens them with uiopen('filenam',true) ?  would need to get someone else's opinion on how temp file writes are best handled within the test environment though.

Nicholas Jankowski <nrjank>
Group Member
Thu 23 Mar 2023 06:15:15 PM UTC, comment #6: 

ok. with a quick glance @priyanshu's files are just blind wrappers for uigetfile and uiputfile which don't actually meet the expected behavior of those functions if they're intended to provide compatibility with the matlab equivalent functions.

(see https://www.mathworks.com/help/matlab/ref/uiopen.html and https://www.mathworks.com/help/matlab/ref/uisave.html)

@ristephens, will try to give your patch a review soon.

Nicholas Jankowski <nrjank>
Group Member
Thu 23 Mar 2023 05:54:26 PM UTC, comment #5: 

apologies, i think your submission was lost in the shuffle as I don't think there are email notifications when a file is attached without a comment and the status was never updated to patch submission. I'll try to take a look sometime soon at both submissions here to see where things stand.

Nicholas Jankowski <nrjank>
Group Member
Thu 23 Mar 2023 04:45:08 PM UTC, comment #4: 

@nrjank: I attached the patch (file #53918) last year but nothing seems to have happened. How do I get it promoted into the next release?

Richard Stephens <ristephens>
Fri 17 Mar 2023 08:33:07 PM UTC, comment #3: 

@priyanshu:  i see that you have uploaded two files to this bug report. please add some commentary about these files. how do or don't they compare to the implementation in the patch that was previously attached to this report? are you able to create a patch with your files instead of just attaching m-files?  (some developers prefer to review using mercurial patches)

Nicholas Jankowski <nrjank>
Group Member
Fri 28 Oct 2022 11:41:18 AM UTC, comment #2: 

Thanks for your contribution.

To help keeping the conversation in one place and not spread it over several places, it might be better if you attached your patch to this report instead of opening a new one.

Markus Mützel <mmuetzel>
Group administrator
Fri 28 Oct 2022 09:21:15 AM UTC, comment #1: 

Submitted patch #10290.

Richard Stephens <ristephens>
Tue 20 Nov 2018 10:58:34 PM UTC, original submission:  

The two GUI functions uiopen and uisave look like they would be easy to implement.  The first is available within the GUI from the menu File->Open.  The second is available from the menu File->Save.  The only thing that needs to be done is to connect an m-file across octave_link to access these functions in the GUI.

Rik <rik5>
Group administrator

 

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

Attach Files:
   
   
Comment:
   

Attached Files
file #54449:  uiopen.m added by priyanshu (114B - application/octet-stream - uiopen.m is the implementation of "uiopen" and uisave.m is the implementation of "uisave")
file #54450:  uisave.m added by priyanshu (107B - application/octet-stream - uiopen.m is the implementation of "uiopen" and uisave.m is the implementation of "uisave")
file #53918:  uiopen_20221025.patch added by ristephens (8KiB - application/octet-stream - Implemented missing commands uiopen.m and uisave.m)

 

Depends on the following items: None found

Digest:
   patch dependencies.

 

Carbon-Copy List
  • -email is unavailable- added by nrjank (Posted a comment)
  • -email is unavailable- added by priyanshu (Updated the item)
  • -email is unavailable- added by mmuetzel (Posted a comment)
  • -email is unavailable- added by ristephens (Posted a comment)
  • -email is unavailable- added by rik5 (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 6 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2023-03-23 nrjank StatusNeed Info Patch Submitted
    2023-03-17 nrjank StatusConfirmed Need Info
    2023-03-07 priyanshu Attached File- Added uiopen.m, #54449
        Attached File- Added uisave.m, #54450
    2022-10-28 mmuetzel Dependencies- patch #10290 is dependent
    2022-10-28 ristephens Attached File- Added uiopen_20221025.patch, #53918

    Back to the top

    Powered by Savane 3.13-4448.
    Corresponding source code