Live Editor fails displaying myObject

I have a handle class myClass which overloads disp, size, isempty and subsref.
An object myObject=myClass won't display in Live Editor.
I am getting the following error:
Warning: Error occured while executing the listener callback for event FLUSH_OUTPUTS defined for class matlab.internal.editor.OutputsManager: Conversion to logical from myClass is not possible.
I would note the myObject does display just fine in the Matlab console. It also displays well in Live Editor of older Matlab versions (2019). The error only occurs in Live Editor of 2020a/b.
any thoughts?

2 Kommentare

K.
K. am 23 Apr. 2021
If you're still having the problem, can you attach a trimmed-down version of your class so that we can try to reproduce this? Thanks
royk
royk am 23 Apr. 2021
thanks
I have already figured it out.
It seems that these issues occur if the class is overloading any of the following methods:
size, isempty, isscalar, numel
with an implementation that does not produce a numeric/logical value

Melden Sie sich an, um zu kommentieren.

Antworten (1)

krishan Gopal
krishan Gopal am 8 Dez. 2021

0 Stimmen

Sir, can you tell me how you resolve the issue

3 Kommentare

Walter Roberson
Walter Roberson am 8 Dez. 2021
@royk reprogrammed their size(), isempty(), isscalar(), and numel() methods to return logical values for isempty() and isscalar(), and numeric values for size() and numel()
royk
royk am 8 Dez. 2021
precisely
krishan Gopal
krishan Gopal am 9 Dez. 2021
Sir thankyou for your answer. But i'm beginner still & not ble to identify how to excute this command. if possible can you please suggest me , how to do it

Melden Sie sich an, um zu kommentieren.

Kategorien

Mehr zu Construct and Work with Object Arrays finden Sie in Hilfe-Center und File Exchange

Produkte

Version

R2020b

Gefragt:

am 18 Jan. 2021

Kommentiert:

am 9 Dez. 2021

Community Treasure Hunt

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

Start Hunting!

Translated by