bugGNU Octave - Bugs: bug #64976, Unable accessing properties (as...

 
 

bug #64976: Unable accessing properties (as function) of a class defined in a namespace

Submitter:  F. Cuvelier <cuvelierp13>
Submitted:  Mon 04 Dec 2023 10:22:08 AM UTC
   
 
Category:  Classdef Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Matlab Compatibility
Status:  None Assigned to:  None
Originator Name:  Open/Closed:  * Open
Release:  * 8.4.0 Operating System:  * GNU/Linux
Fixed Release:  None Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Mon 04 Dec 2023 10:22:08 AM UTC, original submission:  

Hi,
I create a class in a namespace with the constructor  obj=titi.toto(1,2,3), the properties get and disp are not available.

  .
├── test01.m
├── +titi
│   └── @toto
│       ├── disp.m
│       ├── get.m
│       └── toto.m
└── @toto
    ├── disp.m
    ├── get.m
    └── toto.m


>> obj1=toto(1,2,3); % Class from file @toto/toto.m
>> disp(obj1)  % ok using method @toto/disp.m
  A=1
  B=2
  C=3
>> get(obj1,'A') % ok using method @toto/get.m
x = 1
>> obj2=titi.toto(1,2,3); % Class from file +titi/@toto/toto.m
>> disp(obj2)  % failed don't use method @toto/disp.m, using default one
  titi.toto object with properties:

      A: [1x1 double]
      B: [1x1 double]
      C: [1x1 double]
>> get(obj2,'A')  % failed don't use method @toto/get.m, using default one (get for graphics handle)
error: get: H must be a graphics handle


F. Cuvelier <cuvelierp13>

 

(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 cuvelierp13 (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.

     

    No changes have been made to this item

    Back to the top

    Powered by Savane 3.12.
    Corresponding source code