|
"Yuri Geshelin" <geshelin@hotmail.com> wrote in message
news:gjl8bd$gjc$1@fred.mathworks.com...
>I have a simple function that defines a class:
>
> function output_arg = myclass06( i )
> superiorto('myclass07')
> b.k6 = i + 6;
> output_arg = class(b,'myclass06');
> %%% end of myclass06
>
> I call it this way:
>
>>> m6 = myclass06(1);
>
> and it works. Next, I execute the CLEAR command:
>
>>> clear classes
>
> and replace SUPERIORTO with INFERIORTO. I then try to call myclass06
> again, but here is what happens:
>
>>> m6 = myclass06(1);
> ??? Error using ==> inferiorto
> The precedence between class myclass06 and myclass07 cannot be changed
> without clear classes.
The old m6 variable still existed when you executed this command, right? If
so, if I remember correctly the previous CLEAR CLASSES call couldn't clear
myclass06 out of memory (since an instance of the class existed) and so you
receive this error when you try to use the new class definition.
Clear the first m6 variable, then CLEAR CLASSES, and the second
instantiation should work.
--
Steve Lord
slord@mathworks.com
|