From 1b54ec269be539c73c27f8b54e46b8fd67f67c25 Mon Sep 17 00:00:00 2001 From: Max_KUMC_Desktop Date: Fri, 31 Jan 2020 11:05:11 -0600 Subject: [PATCH] Minor bugfix Remove duplicate `getPropertyGroups` method. Typo --- +nigeLab/@Block/initVideos.m | 2 +- +nigeLab/@nigelObj/nigelObj.m | 109 ++-------------------------------- 2 files changed, 5 insertions(+), 106 deletions(-) diff --git a/+nigeLab/@Block/initVideos.m b/+nigeLab/@Block/initVideos.m index f7190e10..4675fe54 100644 --- a/+nigeLab/@Block/initVideos.m +++ b/+nigeLab/@Block/initVideos.m @@ -49,7 +49,7 @@ if ~blockObj.Pars.Video.HasVideo flag = true; - nigelab.utils.cprintf(fmt,'%s[BLOCK/INITVIDEOS]: '); + nigeLab.utils.cprintf(fmt,'%s[BLOCK/INITVIDEOS]: '); nigeLab.utils.cprintf(fmt(1:(end-1)),... 'Skipped video initialization (%s)\n',blockObj.Name); return; diff --git a/+nigeLab/@nigelObj/nigelObj.m b/+nigeLab/@nigelObj/nigelObj.m index b28bad1d..31664bdd 100644 --- a/+nigeLab/@nigelObj/nigelObj.m +++ b/+nigeLab/@nigelObj/nigelObj.m @@ -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 = getPropertyGroups@matlab.mixin.CustomDisplay(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,... - 'Data')... - matlab.mixin.util.PropertyGroup(obj.Meta,... - 'Meta')... - matlab.mixin.util.PropertyGroup(pars_out,... - 'Parameters')... - matlab.mixin.util.PropertyGroup(status_out,... - 'Status')... - ]; - 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 = ... - ['View']; - - data_out.(name) = str_view; - end - groups = [... - matlab.mixin.util.PropertyGroup(data_out,... - 'Data')... - matlab.mixin.util.PropertyGroup(obj.Meta,... - 'Meta')... - matlab.mixin.util.PropertyGroup(pars_out,... - 'Parameters')... - matlab.mixin.util.PropertyGroup(status_out,... - 'Status') - ]; - 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 = ... - ['View']; - data_out.(name) = str_view; - end - groups = [... - matlab.mixin.util.PropertyGroup(data_out,... - 'Data')... - matlab.mixin.util.PropertyGroup(obj.Meta,... - 'Meta')... - matlab.mixin.util.PropertyGroup(pars_out,... - 'Parameters')... - matlab.mixin.util.PropertyGroup(status_out,... - 'Status') - ]; - otherwise - groups = getPropertyGroups@matlab.mixin.CustomDisplay(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