Configure for app fails with "Too many input arguments" when component has an empty constructor
Show older comments
I created the default custome component in the appdesigner. Added an empty constructor and tried to "configure for apps". If fails with "Too many input arguments". I tried adding if nargin > 0, end; Still get the error.
classdef comp1 < matlab.ui.componentcontainer.ComponentContainer
% Properties that correspond to underlying components
properties (Access = private, Transient, NonCopyable)
end
methods
%ctor - if I remove this, I can register without errors
function comp = comp1
end
end
methods (Access = protected)
% Code that executes when the value of a public property is changed
function update(comp)
% Use this function to update the underlying components
end
% Create the underlying components
function setup(comp)
comp.Position = [1 1 320 240];
comp.BackgroundColor = [0.94 0.94 0.94];
end
end
end
Accepted Answer
More Answers (0)
Categories
Find more on Create Custom UI Components in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!