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

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

[Octave-bug-tracker] [bug #46718] Unable to create classes


From: anonymous
Subject: [Octave-bug-tracker] [bug #46718] Unable to create classes
Date: Tue, 14 Nov 2023 08:40:01 -0500 (EST)

Follow-up Comment #9, bug #46718 (project octave):

Just point on the parent directory of the one you will adjoint to the path
(visible on the top left window) and run:

>>addpath ("MyDirectoryName")  

then

>> p =polynomials([1,0,0])


[comment #8 comment #8:]
> I know that this bug report is quite old, but I tripped on it today (January
2023) and maybe my experience can help someone else.
> 
> As said, the constructor function must have the same name of the class and
must belong to a directory whose name is the class name prefixed by '@' (e.g.,
'@polynomial/polynomial.m').
> 
> In my case the error was caused by the fact that I added the '@'-directory
to the path.  The '@' directory must be in a directory in the search path
list, but it **must not** be in the path list itself. 
> 
> To clarify: if you added the directory '@polynomial' in `~/my-octave-lib`
you must do 
> 
> addpath ~/my-octave-lib 
> 
> but NOT  
> 
> addpath ~/my-octave-lib/@polynomial
> 


    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?46718>

_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/




reply via email to

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