bugGNU Octave - Bugs: bug #51847, Variable Editor:...

 
 

bug #51847: Variable Editor: "Up-arrow" button should move upwards in struct hierarchy

Submitter:  Philip Nienhuis <philipnienhuis>
Submitted:  Fri 25 Aug 2017 01:47:05 PM UTC
   
 
Category:  GUI Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Feature Request
Status:  In Progress Assigned to:  None
Originator Name:  Philip Nienhuis Open/Closed:  * Open
Release:  * dev Operating System:  * Any
Fixed Release:  None Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Tue 12 May 2020 10:29:31 PM UTC, comment #5: 

The first issue looks to just be a cosmetic case with highlighting.
Pressing down-arrow or right-arrow shows that focus is actually in the substruct pane x.b but the cell is just not properly highlighted in blue (but does have a dashed border). So highlighting only works properly after the cursor was moved, but it can't be moved up or left as it's the upper left cell.

Somewhat more profound and confusing is that both panes indicate to have focus simultaneously - I'd expect that if focus is moved from one subpane to another, the highlighting moves with it and is removed in the first subpane that lost focus.
I think that's the actual issue here; the lack of complete highlighting in new subpane after it is opened is related but slightly different.

Philip Nienhuis <philipnienhuis>
Group Member
Tue 12 May 2020 09:15:03 PM UTC, comment #4: 

Somewhere in the past two years the second issue with modifying x.a was fixed.  The up-arrow still exists so I'm re-titling the report.


Rik <rik5>
Group administrator
Thu 01 Feb 2018 12:38:16 AM UTC, comment #3: 

Two items to add: 1) Support for 'Up' button, 2) editing of collection variables.

For the first issue, try


x.a = 1
x.b = {1, 2, "hello"}
openvar x
# Double click on 'b' cell containing [1x3 cell]
# This opens up tab x.b
# Click on 'Up' arrow to return to 'x' tab, but nothing happens


For the second issue, proceed as before until tab x.b is open.


# Double click on first cell ('1') and change value to 2, hit <Return>
# The V.E. tab changes to "variable 'x.b' is invalid or undefined



Rik <rik5>
Group administrator
Thu 01 Feb 2018 12:32:01 AM UTC, comment #2: 

Adding jwe to this bug report since he just checked in an implementation of structs (http://hg.savannah.gnu.org/hgweb/octave/rev/a4ea36915e38).


Rik <rik5>
Group administrator
Tue 29 Aug 2017 09:14:54 PM UTC, comment #1: 

Confirmed.  The Variable Editor should be able to do something better for the display of structs.

Rik <rik5>
Group administrator
Fri 25 Aug 2017 01:47:05 PM UTC, original submission:  

Structs and arrays of structs can be opened in the Variable editor, fine.
Double clicking on a cell containing a struct in the Variable Editor should open the struct and show its internals in a new Variable Editor tab.

Attached are a few pics of how Matlab (r2015) shows struct contents, taken from patch #8656 comment #37.
Relevant text from that comment, copied here for convenience:


a = struct ('b', 'field1')
a.c = [1 2; 3 4]
a.d = {1, 'text'; [10 20], {'TL', 'TR'; 'BL', 'BR'}}


gives the output of struct1.png (attached)
Then,

a(2).b = 'field2'


gives struct2.png
Double-clicking field a(1).d (~cell 1, 3) gives struct3.png

So maybe maybe displaying structs doesn't have to be that difficult and could be fairly straightforward.

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 #41651:  struct1-1.png added by philipnienhuis (40KiB - image/png)
file #41652:  struct2-1.png added by philipnienhuis (43KiB - image/png)
file #41653:  struct3-1.png added by philipnienhuis (41KiB - image/png)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by rik5
  • -email is unavailable- added by rik5 (Posted a comment)
  • -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 9 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2020-09-13 rik5 SummaryVariable Editor: up-arrow should move upwards in struct hierarchy Variable Editor: "Up-arrow" button should move upwards in struct hierarchy
    2020-05-12 rik5 SummaryVariable Editor: should be able to show struct internals Variable Editor: up-arrow should move upwards in struct hierarchy
    2018-02-01 rik5 StatusConfirmed In Progress
        SummaryVariable Editor should be able to show struct internals Variable Editor: should be able to show struct internals
        Carbon-Copy- Added jwe
    2017-08-29 rik5 StatusNone Confirmed
    2017-08-25 philipnienhuis Attached File- Added struct1-1.png, #41651
        Attached File- Added struct2-1.png, #41652
        Attached File- Added struct3-1.png, #41653

    Back to the top

    Powered by Savane 3.13-f8d8.
    Corresponding source code