Configure for app fails with "Too many input arguments" when component has an empty constructor
古いコメントを表示
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
採用された回答
その他の回答 (0 件)
カテゴリ
ヘルプ センター および File Exchange で Create Custom UI Components についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!