bugGNU Octave - Bugs: bug #34831, cannot create a private class

 
 

bug #34831: cannot create a private class

Submitted by:  Patrick Gosling <jpmg>
Submitted on:  Tue 15 Nov 2011 01:55:21 PM UTC  
 
Category: InterpreterSeverity: 3 - Normal
Priority: 5 - NormalItem Group: Other
Status: Wont FixAssigned to: None
Originator Name: Open/Closed: Closed
Release: 3.4.3Operating 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 28 Jan 2014 04:12:06 AM UTC, comment #3:

This will most likely not be implemented in Octave. There has not been much activity on this bug report in over 2 years. Also this feature is not supported at all in Matlab [1]:

> You cannot put class definitions in private folders because doing so would not meet the requirements for @ or path folders.


[1] http://www.mathworks.com/help/matlab/matlab_oop/organizing-classes-in-folders.html

Mike Miller <mtmiller>
Project Administrator
Wed 16 Nov 2011 06:58:36 PM UTC, comment #2:

I saw somewhere on the octave site a section on matlab differences, IIRC private dirs in class definitions are not scanned (at all).

You can make them public if that does not cause issues elsewhere by them not being private.

HTH , Charlie

Anonymous
Tue 15 Nov 2011 10:45:00 PM UTC, comment #1:

I'm slightly embarrassed that my attempt to produce a minimal example meant that I forgot to call class() in the constructor;

However, if I add the line
to the constructor, it still fails to make the class work.

Patrick Gosling <jpmg>
Tue 15 Nov 2011 01:55:21 PM UTC, original submission:

If I create a class directory within a private directory, the class does not become available for use within the current directory; nor does it become available for use within the private directory.

So if I create ./testit.m containing

and also create ./private/@foo/foo.m containing

then it will complain with

It will also complain similarly, if you attempt to construct a foo from within a private function.

So if I also create ./private/privfoo.m containing

and a file test2.m containing

then privfoo() called from test2() will complain in just the same way.

So I don't currently see any way of constructing a class that has the property of being private.

Patrick Gosling <jpmg>

 

(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 mtmiller (Posted a comment)
  • -unavailable- added by jpmg (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 2 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Tue 28 Jan 2014 04:12:06 AM UTCmtmillerStatusNone=>Wont Fix
      Open/ClosedOpen=>Closed

    Back to the top


    Powered by Savane 3.1-cleanup1