octave-maintainers
[Top][All Lists]
Advanced

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

Re: classdef problems


From: Richard Crozier
Subject: Re: classdef problems
Date: Thu, 12 Sep 2013 12:59:23 +0100
User-agent: Internet Messaging Program (IMP) H3 (4.3.8)

On 12/09/2013 12:20, John W. Eaton wrote:
On 09/12/2013 07:05 AM, Richard Crozier wrote:
On 12/09/2013 11:43, Richard Crozier wrote:
Quoting Richard Crozier <address@hidden> on Thu, 12 Sep 2013
11:26:12 +0100:


I'm using 498b2dd1bd56 (classdef).




Ok, apologies, I've realised my errors where largely due to using
addpath(genpath('.')) when testing rather than the full path name. I
still think there may be a bug in there somewhere though, would it be
possible for octave to resolve paths to overcome the ingenuity of fools
such as myself?

What did addpath (genpath ('.')) do incorrectly?  Did it add + and @
directories to the path?  Should it not do that?  If not, is it genpath
or addpath that should be fixed?  Or should it just warn you?  I can see
arguments for all possibilities, but probably the only thing that
matters is WDMD, because if we don't do what Matlab does, we will likely
see bug reports about the differences.

jwe




It added directories starting with '.' to the path. When I changed directory it could no longer find the paths, at least this is my guess at what is happening from the load path errors I am getting. I've checked and Matlab exhibits the same behaviour if you add relative paths, then change directory. addpath didn't do anything incorrectly, it did exactly what I asked, but I was asking something slightly silly.

However, further to this, I think there really is still some kind of issue with package folders in classdef, if I correctly add the package directory, I get issues:


address@hidden ~/src/nova_package $ octave-cli
warning: function ./+oandm/system.m shadows a built-in function
GNU Octave, version 3.7.5
Copyright (C) 2013 John W. Eaton and others.
This is free software; see the source code for copying conditions.
There is ABSOLUTELY NO WARRANTY; not even for MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE.  For details, type 'warranty'.

Octave was configured for "i686-pc-linux-gnu".

Additional information about Octave is available at http://www.octave.org.

Please contribute if you find this software useful.
For more information, visit http://www.octave.org/get-involved.html

Read http://www.octave.org/bugs.html to learn how to submit bug reports.

For information about changes from previous versions, type 'news'.

octave-cli:1> addpath(genpath ("/home/richard/src/<snip>"))
warning: function /home/richard/src/nova_package/renewnet-foundry/matlab-octave/tb-multicore/gethostname.m shadows a built-in function warning: function /home/richard/src/<snip>/+oandm/system.m shadows a built-in function
octave-cli:2> ls
class: system
superclass: handle
method block
constructor: system
method: evaluate
method: addcomponent
method: service
method: plotmaintenancescatter
method: plotrevenuescatter
method: plotnetrevenuescatter
property block
property attribute: SetAccess = protected
property attribute: GetAccess = public
property: Components
property default:
property: NReplicates
property: MaintenanceCosts
property: ComponentMaintenanceCosts
property: Revenue
property: NetRevenue
property: IntervalRevenue
property: ServiceInterval
property: InspectionInterval
property: ServiceFixedCost
property: ServiceIntervalRate
property: ServiceDurationParams
constructor
error: zeros: invalid data type specified
error: called from:
error:   /home/richard/src/nova_package/+oandm/system.m at line 57, column 35
deleting system object (handle)
error: /usr/local/share/octave/3.7.5/m/miscellaneous/ls.m at line 69, column 20
octave-cli:2>


Richard






--
The University of Edinburgh is a charitable body, registered in
Scotland, with registration number SC005336.




reply via email to

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