Commit f36951b8 authored by Jan-Gerrit Richter's avatar Jan-Gerrit Richter

added check for multiinstance in both itaAudio and itaSuper disp

this is only needed for tooltips in the editor. Otherwise the function crashes with an audible signal
parent 15a272dd
......@@ -10,6 +10,10 @@ function disp(this)
if ita_preferences('nakedClasses')
builtin('disp',this)
else
if numel(this) > 1
disp(['size(' inputname(1) ') = [' num2str(size(this)) ']; (for full display, pick a single instance)']);
return;
end
disp@itaSuper(this)
sr = [num2str(this.samplingRate,5) ' Hz'];
sr = [sr repmat(' ',1,8-numel(sr))];
......
......@@ -10,6 +10,11 @@ function disp(this)
if ita_preferences('nakedClasses')
builtin('disp',this)
else
if numel(this) > 1
disp(['size(' inputname(1) ') = [' num2str(size(this)) ']; (for full display, pick a single instance)']);
return;
end
disp([' domain = ' this.domain ' (nBins = ' num2str(this.nBins) ', nSamples = ' num2str(this.nSamples) ', dimensions = ' num2str(this.dimensions) ') '])
comment = this.comment;
nMax = 36;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment