bugGNU Octave - Bugs: bug #53105, Variable Editor: "Up"...


bug #53105: Variable Editor: "Up" button should work for structs

Submitted by:  Rik <rik5>
Submitted on:  Fri 09 Feb 2018 05:00:11 PM UTC  
Category:  GUI Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Incorrect Result
Status:  None 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.


Tue 20 Feb 2018 03:12:17 AM UTC, comment #3: 

Attached is a fix.  The good news is that the current test for cells and matrices checks the last character.  This means that something like the following also functions properly with the fix:

y{1} = struct ('f1', 2, 'f2', [3 4]);
y{2} = struct ('f1', 2, 'f2', [3 4]);
openvar y;

The displayed names are y{1,1} then y{1,1}.f2.  In the latter case the last character is neither '}' nor ']'.

The bad news is that Up doesn't produce a proper editable view if the "up-level" name window is deleted.  E.g., in your example, close the 's' window and then press up.  But I think that is a bug reported somewhere else:


...or close to it.

(file #43369)

Dan Sebald <sebald>
Tue 20 Feb 2018 02:28:14 AM UTC, comment #2: 

Disregard my comment #1.  I'll take a look at this and see how easy it is to fix, being pretty familiar with the code after having finished the changeset noted previously.

Dan Sebald <sebald>
Sun 11 Feb 2018 05:49:27 AM UTC, comment #1: 

Before anyone sets to work on fixing this, I want to point out that I just about have ready a revamped variable editor


that I think will obviate this "up" button because it won't be strictly tab-widget oriented anymore.  There will be tabs, but in the QMainWindow sense (i.e., the look-and-feel one sees in the main GUI window).  In this revamped variable editor, just using Tab and Backtab achieves pretty much the same as the Up button.

Hence, if in the new editor we decide we want to retain the Up button, there's probably an easier way of incorporating the Tab and Backtab events than deciphering the Octave expression to call "edit_variable()".

Dan Sebald <sebald>
Fri 09 Feb 2018 05:00:11 PM UTC, original submission:  

The "Up" button works correctly for cell arrays, but not for the struct data container.

Sample code to reproduce:

s = struct ('f1', 2, 'f2', [3 4]);
openvar s
# Double-Click on 'f2' cell to edit it in a new tab
# Single-Click on 'Up' button to return to 's' tab, but it doesn't work

Rik <rik5>
Project Administrator


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

Attach Files:


Depends on the following items: None found

Items that depend on this one: None found


Carbon-Copy List
  • -email is unavailable- added by sebald (Posted a comment)
  • -email is unavailable- added by rik5 (Submitted the item)

    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.




    Follows 1 latest change.

    Date Changed by Updated Field Previous Value => Replaced by
    2018-02-20 sebald Attached File- => Added octave-variable_editor_structures-djs2018feb19.patch, #43369

    Back to the top

    Powered by Savane 3.5