help-octave
[Top][All Lists]
Advanced

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

Re: Octave class search path problem


From: John Evans
Subject: Re: Octave class search path problem
Date: Wed, 26 Oct 2011 12:06:55 -0700 (PDT)

Thank you for your help! You're right, if I start Octave in the /baz directory, then 

addpath("/fooBar")

I'm able to instantiate foo, however, if I start Octave in the /fooBar directory, I receive the previous error message. Although it's a minor inconvenience, it will solve my problem for now.

Also, thanks jwe for the clarification regarding Octave classes and constructors.

~John

--- On Wed, 10/26/11, John W. Eaton <address@hidden> wrote:

From: John W. Eaton <address@hidden>
Subject: Re: Octave class search path problem
To: "John Evans" <address@hidden>
Cc: "Carnë Draug" <address@hidden>, "address@hidden" <address@hidden>
Date: Wednesday, October 26, 2011, 2:42 PM

On 26-Oct-2011, John Evans wrote:

| Unfortunately, the actual code contains sensitive IP, however, I can post my
| contrived example. You can find the contents of /fooBar/@foo/foo.m as well as a
| small example of my problem at
|
| http://pastebin.com/ZD4TjMEg

I can duplicate the problem with Octave 3.2.4, but it appears to be
fixed in the current stable release, 3.4.3.

It also seems to work for me with 3.2.4 if I start Octave somewhere
other than the directory that contains the @foo class directory.  Does
that work for you?  I.e., cd to your /baz directory and start Octave
there, then call addpath ("/fooBar"), then try to call the constructor
for foo.

BTW, your example constructor doesn't create a class object.  It just
returns the class of the character constant "foo".  To create a class
object, you need to pass a structure to the class function:

  x = class (struct (), "foo");

instead of

  x = class ("foo");

jwe

reply via email to

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