help-octave
[Top][All Lists]
Advanced

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

RE: Clearing function and method definitions?


From: Barry, Dave (STRT)
Subject: RE: Clearing function and method definitions?
Date: Tue, 3 Jul 2012 12:38:14 -0400

You are correct. I have noticed, before this, that modified functions don't 
always load the updated file.  I performed the example you requested and here 
are the results.


Here is the file I made:
OExample1.m 
Filestart:
## written to test function freshing

display("Inside OExample1");
##display("OExample1 has been changed!!");
:fileend

In this example I started with this file. Results:
octave:4> OExample1
Inside OExample1

Then I removed the ## and saved. Results:
octave:5> OExample1
Inside OExample1

OExample1 has been changed!!

Then I reinserted the ## and saved. Results:
octave:6> OExample1
Inside OExample1

OExample1 has been changed!!               <------ Output did not reflect 
current file definition but last one.  Without changing the file I repeated the 
command.

octave:7> OExample1
Inside OExample1                           <------ Output now reflects current 
file definition.

If I repeat this I find that the file definition is not updated until after the 
script is run.









David E. Barry
Senior Engineer
TRAK Microwave
(813) 901-7254

-----Original Message-----
From: address@hidden [mailto:address@hidden On Behalf Of Jordi Gutiérrez Hermoso
Sent: Tuesday, July 03, 2012 12:05 PM
To: Barry, Dave (STRT)
Cc: address@hidden
Subject: Re: Clearing function and method definitions?

On 3 July 2012 11:27, Barry, Dave (STRT) <address@hidden> wrote:
>> From: address@hidden
>> On 3 July 2012 10:14, Barry, Dave (STRT) <address@hidden> wrote:

>>> I am running Octave 3.6.1 on Windows XP 32bit.  I am trying to use 
>>> OOP right now and run into a problem where the function 'methods()' 
>>> returns a list of functions located in my @class folder, but does 
>>> not update when a new method is added or removed.

>> If you put your files in a different directory, in a location that is 
>> not "standard" for Octave, do you still have this problem?

> My script files are located outside of the install directory of Octave 
> in a non-standard location to begin with.  I have added this location 
> to the startup and envir path so they will be found when running 
> Octave.

Hm. How are you adding this location? What commands are you running, what are 
you modifying?

> Do you think I should move them?

Perhaps. Before you do that, try a simple example where you first start Octave, 
then you cd into some other location, and in that location you start to create 
a class and modify it while Octave is still running. Do you still have the 
problem about Octave not reloading your files? I think classes are a red 
herring here. I think you should be observing this problem with files not 
reloaded with any script or function file.

- Jordi G. H.

______________________________________________________________________
CAUTION: This message was sent via the Public Internet and its authenticity 
cannot be guaranteed.

PROPRIETARY: This e-mail contains proprietary information some or all of which 
may be legally privileged.  It is intended for the recipient only.  If an 
addressing or transmission error has misdirected this e-mail, please notify the 
authority by replying to this e-mail.  If you are not the intended recipient 
you must not use, disclose, distribute, copy, print, or rely on this e-mail.


reply via email to

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