bugGNU Octave - Bugs: bug #53033, Variable editor: allow empty cells...

 
 

bug #53033: Variable editor: allow empty cells to be edited and value cells to be emptied

Submitted by:  Philip Nienhuis <philipnienhuis>
Submitted on:  Thu 01 Feb 2018 09:46:19 AM UTC  
 
Category: GUISeverity: 3 - Normal
Priority: 5 - NormalItem Group: Matlab Compatibility
Status: In ProgressAssigned to: None
Originator Name: philipnienhuisOpen/Closed: Open
Release: devOperating System: Any

Add a New Comment(Rich Markup)
   

You are not logged in

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

 

Fri 09 Feb 2018 10:44:07 PM UTC, comment #4:

Reopening - I don't think it is complete yet:
Do:

a = num2cell (rand (2));

then right-click any cell, select "clear" => sets it to numeric 0, while I'd expect to see empty (0x0 matrix).
Also IMO the Del key should be usable for emptying cell array cells or struct fields (works Matlab), but OK that may be a feature request.

In the above example, assigning a char value to a cell with previous numeric value works for any cell. However, if/once a cell contains a char value, in the VE it can only be assigned another char value.
IOW, the VE doesn't understand that leading quote is required to indicate a numeric value and a missing leading quote indicates numeric or maybe logical value.
In Matlab, char value are shown decorated with quotes. Maybe it is better if Octave would do the same - IIRC the VE as it was last year behaved like that.

(hg id a979bb895b64 avoid reinterpret_cast ...)

Philip Nienhuis <philipnienhuis>
Project Member
Fri 09 Feb 2018 04:43:32 PM UTC, comment #3:

This seems to work now. Marking as fixed and closing report.

Rik <rik5>
Project Administrator
Sat 03 Feb 2018 06:52:11 PM UTC, comment #2:

I pushed the following changeset:

http://hg.savannah.gnu.org/hgweb/octave/rev/ea058ec5ef30

Now the concept of data rows/columns and display rows/columns are managed seprately and the size of the display is always kept larger than the size of the data to allow adding elements beyond the existing limits of a matrix.

This change doesn't cause the display to be resized when scrolling beyond the current display size, but that feature should be fairly easy to add.

John W. Eaton <jwe>
Project Administrator
Thu 01 Feb 2018 04:27:29 PM UTC, comment #1:

I think this was one of those itmes that was next on the list for implementation. The desired behavior already exists for strings, i.e., an empty string is editable. It therefore shouldn't be too hard to extend that to numeric objects.

Rik <rik5>
Project Administrator
Thu 01 Feb 2018 09:46:19 AM UTC, original submission:

Empty cells or struct fields cannot be assigned a value, the display '[0x0 matrix]' seems immutable (that is, I haven't found a way to assign it a value in the V.E.).
Matlab allows editing of such cells so they can be assigned a value.

The other way round, editing a cell + emptying it merely sets it to empty string (''), pressing the Del key does not work (in the latter case the terminal shows "syntax error" and a popup appears "failed to evaluate...").
Right-clicking the cell and selecting 'clear' sets it to numeric 0, Matlab doesn't have that option.

For cell arrays and struct fields, Matlab consistently sets the cell contents to empty '[]' (an empty double matrix, checked by inspecting the class of the cell value), irrespective of the original cell value class.

Philip Nienhuis <philipnienhuis>
Project Member

 

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

Attach File(s):
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by jwe (Posted a comment)
  • -unavailable- added by rik5 (Posted a comment)
  • -unavailable- added by philipnienhuis (Submitted the item)
  •  

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

    Only project members can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 6 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Fri 09 Feb 2018 10:44:07 PM UTCphilipnienhuisStatusFixed=>In Progress
      Open/ClosedClosed=>Open
    Fri 09 Feb 2018 04:43:32 PM UTCrik5StatusReady For Test=>Fixed
      Open/ClosedOpen=>Closed
    Sat 03 Feb 2018 06:52:21 PM UTCjweStatusConfirmed=>Ready For Test
    Thu 01 Feb 2018 04:27:29 PM UTCrik5StatusNone=>Confirmed

    Back to the top


    Powered by Savane 3.1-cleanup1