octave-maintainers
[Top][All Lists]
Advanced

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

Re: [classdef] Can someone test this for me?


From: Серёжа Плотников
Subject: Re: [classdef] Can someone test this for me?
Date: Tue, 15 Oct 2013 19:45:34 +0200

Hi Michael,

below are the results from R2013a

>> c = ?classderiv
Method 'fun' in class 'classderiv' conflicts with the Sealed method from the superclass definition in
'classbase'.
 
>> c.MethodList
Undefined variable "c" or function "c.MethodList".

New ML Session:

>> x = classderiv
Error using classderiv
Method 'fun' in class 'classderiv' conflicts with the Sealed method from the superclass definition in
'classbase'.
 
>> x.fun
Undefined variable "x" or function "x.fun".

Be happy,
Sergey


2013/10/15 Michael Goffioul <address@hidden>
In Matlab, of course.

file classbase.m:
classdef classbase
  methods (Sealed)
    function y = fun (obj)
      y = 0;
    end
  end
end

file @classderiv/classderiv.m:
classdef classderiv < classbase
end

file @classderiv/fun.m:
function y = fun (obj)
  y = 1;
end

Then at Matlab prompt:

c = ?classderiv
c.MethodList

Then restart Matlab and at the prompt:

x = classderiv
x.fun

Thanks,
Michael.



reply via email to

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