Info

This question is closed. Reopen it to edit or answer.

Strange output from WHICH for class definition file in package

1 view (last 30 days)
I encounter an intermittent problem with class definition files, which are in a package. The function WHICH returns the filespec twice. The second time as shadowed. The first time the drive letter is upper case and the second lower.
After restart of Matlab I don't see the behavior for some time.
How is WHICH supposed to work with a class definition file in a package? The documentation doesn't say. My call with the full filespec might not be legal.
There "cannot" be (and is not) two files with identical names in the same folder.
R2012a, 64bit, Windows 7.
Can somebody comment on this behavior?
.
Example:
>> which -all h:\m\PiaX\test4ida\+test4ida\HasSimulationModelState.m
H:\m\PiaX\test4ida\+test4ida\HasSimulationModelState.m % test4ida.HasSimulationModelState constructor
h:\m\PiaX\test4ida\+test4ida\HasSimulationModelState.m % Shadowed test4ida.HasSimulationModelState constructor
(Above the comments are wrapped.)
>> which -all test4ida.HasSimulationModelState.m
'test4ida.HasSimulationModelState.m' not found.
>> which -all HasSimulationModelState.m
'HasSimulationModelState.m' not found.
.
where
classdef HasSimulationModelState < test4ida.State
% HasSimulationModelState
properties
end
methods
function this = HasSimulationModelState( varargin )
persistent ipp
if nargin == 0, return, end
if isempty( ipp )
ipp = InputPreprocessor( {
1 'Context' '' {'test4ida.IdaTester'} {}
} );
end
ipv = ipp.parse( varargin{:} );
this.context = ipv.Context;
end
function startSimulationProcess( this )
17;
this.context.ice_adapter.startSimulation
this.context.currentState = this.context.simulationStartingState;
this.context.StartAttemptSdn = now;
Logger.add( test4ida_message( this.context ) )
end
end
end

Answers (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!