bugGNU Octave - Bugs: bug #46387, Display class properties

 
 

bug #46387: Display class properties

Submitter:  Ceral Paquet <octavebugs>
Submitted:  Fri 06 Nov 2015 04:18:35 PM UTC
   
 
Category:  Interpreter Severity:  1 - Wish
Priority:  3 - Low Item Group:  Feature Request
Status:  Fixed Assigned to:  None
Originator Name:  Open/Closed:  * Closed
Release:  * dev Operating System:  * Any
Fixed Release:  None Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Sun 03 Mar 2019 07:59:28 AM UTC, comment #3: 

Octave now displays properties.  Marking bug as fixed and closing report.

Rik <rik5>
Group administrator
Fri 09 Dec 2016 10:50:09 PM UTC, comment #2: 

+1 at the feature request.

For the sake of linking related reports, it's also been mentioned in bug #49794.

Amro <amro_octave>
Tue 25 Oct 2016 09:31:08 PM UTC, comment #1: 

I think this amounts to re-defining the display routine for classdef objects.  That might not be so hard, except that Octave is also missing functions like properties() and events() to get listings of those fields.

Rik <rik5>
Group administrator
Fri 06 Nov 2015 04:18:35 PM UTC, original submission:  

This is an m-file called myclass.m:


classdef myclass

properties
  a=1;
  b=2;
  c=3;
end

end


When you create an instance, then try to see the properties none are displayed.

m=myclass
m =

<object myclass>


With structures the members are displayed:

s.a=1;s.b=2;s.c=3;s
s =

  scalar structure containing the fields:

    a =  1
    b =  2
    c =  3

which is very helpful for debugging etc. Would it be possible to do something similar with classes?

Matlab does the following:

m=myclass
m =
  myclass with properties:

    a: 1
    b: 2
    c: 3


Ceral Paquet <octavebugs>

 

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

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

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

    Date Changed by Updated Field Previous Value => Replaced by
    2019-03-11 mtmiller Open/ClosedOpen Closed
    2019-03-03 mtmiller Carbon-CopyRemoved 80942 -
    2019-03-03 rik5 StatusConfirmed Fixed
    2016-10-25 rik5 SummaryDisplay class properties Display class properties
    2015-12-22 mtmiller CategoryNone Interpreter
        Severity3 - Normal 1 - Wish
        Priority5 - Normal 3 - Low
        Item GroupNone Feature Request
        StatusNone Confirmed
        Release4.0.0 dev
        Operating SystemGNU/Linux Any

    Back to the top

    Powered by Savane 3.13-758e.
    Corresponding source code