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

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

[Octave-bug-tracker] [bug #36230] New files in folder @myclass are not s


From: Mike Miller
Subject: [Octave-bug-tracker] [bug #36230] New files in folder @myclass are not scanned after addpath is called
Date: Mon, 30 Sep 2013 02:51:57 +0000
User-agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/29.0.1547.57 Safari/537.36

Update of bug #36230 (project octave):

              Item Group:                    None => Incorrect Result       
                  Status:               Need Info => Confirmed              
                 Release:                   3.6.1 => dev                    

    _______________________________________________________

Follow-up Comment #2:

Confirmed present in the development version. The @myclass directory does not
have to be added to the path, as long as the directory containing it is in the
path.

In Octave's pwd, in another terminal while Octave is running, create a class
constructor:


$ mkdir @myclass
$ cat > @myclass/myclass.m
function x = myclass ()
  x = class (struct (), "myclass");
endfunction


Now in the running Octave, construct an object of type "myclass"


octave:1> x = myclass ()
x = <class myclass>


Now create the method newfunc in the @myclass directory, while the same Octave
is still running:


$ cat > @myclass/newfunc.m
function y = newfunc (x)
  y = x;
endfunction


And back inside Octave:


octave:2> newfunc (x)
error: 'newfunc' undefined near line 1 column 1
octave:3> rehash
octave:4> newfunc (x)
error: 'newfunc' undefined near line 1 column 1


Now resetting the path makes it work:


octave:5> path (path ());
octave:6> newfunc (x)
ans = <class myclass>


    _______________________________________________________

Reply to this item at:

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

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




reply via email to

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