octave-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Octave-bug-tracker] [bug #34831] cannot create a private class


From: Patrick Gosling
Subject: [Octave-bug-tracker] [bug #34831] cannot create a private class
Date: Tue, 15 Nov 2011 13:55:23 +0000
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:7.0.1) Gecko/20100101 Firefox/7.0.1

URL:
  <http://savannah.gnu.org/bugs/?34831>

                 Summary: cannot create a private class
                 Project: GNU Octave
            Submitted by: jpmg
            Submitted on: Tue 15 Nov 2011 13:55:21 GMT
                Category: Interpreter
                Severity: 3 - Normal
                Priority: 5 - Normal
              Item Group: Other
                  Status: None
             Assigned to: None
         Originator Name: 
        Originator Email: 
             Open/Closed: Open
         Discussion Lock: Any
                 Release: 3.4.3
        Operating System: GNU/Linux

    _______________________________________________________

Details:

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


function testit()
   f = foo(1);
endfunction


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


function ret = foo(a)
   ret.x = a;
endfunction


then it will complain with


error: `foo' undefined near line 2 column 8


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


function ret = privfoo(a)
   ret = foo(a);
endfunction


and a file test2.m containing

function ret = test2()
   f = privfoo(1);
endfunction


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.




    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?34831>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]