-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Remove duplicate `getPropertyGroups` method. Typo
- Loading branch information
Showing
2 changed files
with
5 additions
and
106 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5050,111 +5050,6 @@ function displayScalarObject(obj,displayType) | |
disp(footer); | ||
end | ||
|
||
% Overload for matlab.mixin.CustomDisplay.getPropertyGroups | ||
function groups = getPropertyGroups(obj,displayType) | ||
%GETPROPERTYGROUPS Overload for returning properties to display | ||
% | ||
% Overload of matlab.mixin.CustomDisplay.getPropertyGroups to | ||
% change default output in Command Window for a scalar nigelObj | ||
|
||
if nargin < 2 | ||
displayType = 'default'; | ||
end | ||
|
||
switch lower(displayType) | ||
case {'default','nonscalar'} | ||
groups = [email protected](obj); | ||
case 'scalar' | ||
status_out = obj.getDescriptiveStatus(); | ||
pars_out = obj.getDescriptivePars(); | ||
switch obj.Type | ||
case 'Block' | ||
data_out = struct(... | ||
'Name',obj.Name,... | ||
'Duration',obj.Duration,... | ||
'NumChannels',obj.NumChannels,... | ||
'NumProbes',obj.NumProbes,... | ||
'SampleRate',obj.SampleRate,... | ||
'RecSystem',obj.RecSystem.Name,... | ||
'User',obj.User); | ||
|
||
groups = [... | ||
matlab.mixin.util.PropertyGroup(data_out,... | ||
'<strong>Data</strong>')... | ||
matlab.mixin.util.PropertyGroup(obj.Meta,... | ||
'<strong>Meta</strong>')... | ||
matlab.mixin.util.PropertyGroup(pars_out,... | ||
'<strong>Parameters</strong>')... | ||
matlab.mixin.util.PropertyGroup(status_out,... | ||
'<strong>Status</strong>')... | ||
]; | ||
case 'Animal' | ||
data_out = struct; | ||
for i = 1:numel(obj.Children) | ||
% Get rid of any "weird" characters | ||
name = strrep(obj.Children(i).Name,'-','_'); | ||
name = strrep(name,' ','_'); | ||
name = strrep(name,'+','_'); | ||
name = strrep(name,'&','_'); | ||
name = strrep(name,'|','_'); | ||
if ~regexpi(name,'[a-z]') | ||
name = ['Block_' name]; | ||
end | ||
str_view = ... | ||
['<a href="matlab: ' ... | ||
'nigeLab.sounds.play(''pop'',1.5);' ... | ||
'nigeLab.nigelObj.DisplayCurrent(tankObj.' ... | ||
sprintf(['Children(%g).Children(%g),'... | ||
'''simple'');"'], obj.Index,i) '>View</a>']; | ||
|
||
data_out.(name) = str_view; | ||
end | ||
groups = [... | ||
matlab.mixin.util.PropertyGroup(data_out,... | ||
'<strong>Data</strong>')... | ||
matlab.mixin.util.PropertyGroup(obj.Meta,... | ||
'<strong>Meta</strong>')... | ||
matlab.mixin.util.PropertyGroup(pars_out,... | ||
'<strong>Parameters</strong>')... | ||
matlab.mixin.util.PropertyGroup(status_out,... | ||
'<strong>Status</strong>') | ||
]; | ||
case 'Tank' | ||
data_out = struct; | ||
for i = 1:numel(obj.Children) | ||
name = strrep(obj.Children(i).Name,'-','_'); | ||
name = strrep(name,' ','_'); | ||
if ~regexpi(name,'[a-z]') | ||
name = ['Animal_' name]; | ||
end | ||
str_view = ... | ||
['<a href="matlab: ' ... | ||
'nigeLab.sounds.play(''pop'',1.5);' ... | ||
'nigeLab.nigelObj.DisplayCurrent(tankObj.' ... | ||
sprintf('Children(%g),''simple'');"',i) ... | ||
'>View</a>']; | ||
data_out.(name) = str_view; | ||
end | ||
groups = [... | ||
matlab.mixin.util.PropertyGroup(data_out,... | ||
'<strong>Data</strong>')... | ||
matlab.mixin.util.PropertyGroup(obj.Meta,... | ||
'<strong>Meta</strong>')... | ||
matlab.mixin.util.PropertyGroup(pars_out,... | ||
'<strong>Parameters</strong>')... | ||
matlab.mixin.util.PropertyGroup(status_out,... | ||
'<strong>Status</strong>') | ||
]; | ||
otherwise | ||
groups = [email protected](obj); | ||
end | ||
|
||
otherwise | ||
error(['nigeLab:' mfilename ':BadType'],... | ||
'Unexpected case: %s',displayType); | ||
end | ||
end | ||
|
||
% Return `Substruct` array indices to "Methods" subscripts | ||
function [methodSubs,methodName,methodOutputs,methodInputs] = findMethodSubsIndices(obj,S) | ||
%FINDMETHODSUBSINDICES Return array indices to methods subscripts | ||
|
@@ -5447,8 +5342,12 @@ function displayScalarObject(obj,displayType) | |
case 'Animal' | ||
data_out = struct; | ||
for i = 1:numel(obj.Children) | ||
% Get rid of any "weird" characters | ||
name = strrep(obj.Children(i).Name,'-','_'); | ||
name = strrep(name,' ','_'); | ||
name = strrep(name,'+','_'); | ||
name = strrep(name,'&','_'); | ||
name = strrep(name,'|','_'); | ||
if ~regexpi(name,'[a-z]') | ||
name = ['Block_' name]; | ||
end | ||
|