bugGNU Octave - Bugs: bug #36230, new function files in @myclass...

 
 

bug #36230: new function files in @myclass directory are not parsed when already in load path

Submitted by:  Guillaume Simard <gsimard>
Submitted on:  Tue 17 Apr 2012 07:20:26 PM UTC  
 
Category: InterpreterSeverity: 2 - Minor
Priority: 5 - NormalItem Group: Incorrect Result
Status: ConfirmedAssigned to: None
Originator Name: Guillaume SimardOpen/Closed: Open
Release: devOperating System: GNU/Linux

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Sat 19 Nov 2016 09:31:02 PM UTC, comment #3:

This behavior is still fully present in Octave 4.2.0.

Hartmut <hardy>
Mon 30 Sep 2013 02:51:57 AM UTC, 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:

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

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

And back inside Octave:

Now resetting the path makes it work:

Mike Miller <mtmiller>
Project Administrator
Tue 19 Jun 2012 11:58:56 AM UTC, comment #1:

I checked to see how Matlab behaves, and found that Matlab does not allow paths beginning with "@" to path().

Even so, as Octave does for the moment, have you checked to see if the problem persists if "@" is not the first character in the directory?

I don't see this problem on MacOS. Can you reliably reproduce it? Does "rehash()" properly refresh the path for you?

Ben Abbott <bpabbott>
Project Member
Tue 17 Apr 2012 07:20:26 PM UTC, original submission:

addpath("/directory/containing/folder@myclass")

create a new file @myclass/newfunc.m with valid newfunc function, then invoke it on an object of type myclass

newfunc(c)

error: `newfunc' undefined ...

However if addpath is called AFTER the file is created, in other words if the file exists prior to calling addpath, invocation of newfunc(c) works just fine.

Guillaume Simard <gsimard>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by hardy (Posted a comment)
  • -unavailable- added by mtmiller (Posted a comment)
  • -unavailable- added by bpabbott (Posted a comment)
  • -unavailable- added by gsimard (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only project members can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 6 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Tue 22 Aug 2017 06:10:26 PM UTCmtmillerSeverity3 - Normal=>2 - Minor
      SummaryNew files in folder @myclass are not scanned after addpath is called=>new function files in @myclass directory are not parsed when already in load path
    Mon 30 Sep 2013 02:51:57 AM UTCmtmillerItem GroupNone=>Incorrect Result
      StatusNeed Info=>Confirmed
      Release3.6.1=>dev
    Tue 19 Jun 2012 11:59:32 AM UTCbpabbottStatusNone=>Need Info

    Back to the top


    Powered by Savane 3.1-cleanup1