フィルターのクリア

whats wrong with my app?

14 ビュー (過去 30 日間)
Muazma Ali
Muazma Ali 2024 年 3 月 3 日
コメント済み: Muazma Ali 2024 年 3 月 18 日
I have declared app2 as the input argument in my startup for visualiseringsapp2_1 because it is using the public property from app2 (called antall_soner), and the callingapp is app 3 . ( meaning the visualiseringsapp2_1 is called from app3), as you can see.
I am gettin this error message when I run the app:
Error using visualiseringsapp2_1/startupFcn (line 23)
Not enough input arguments.
Error in visualiseringsapp2_1 (line 115)
runStartupFcn(app, @(app)startupFcn(app, varargin{:}))
Error in app3/DisplayallresultsButtonPushed (line 1855)
visualiseringsapp2_1(app)
Error using matlab.ui.control.internal.controller.ComponentController/executeUserCallback (line 335)
Error while evaluating Button PrivateButtonPushedFcn.
Dot indexing is not supported for variables of this type.
Error in visualiseringsapp2_1/SwitchValueChanged (line 42)
for i = 1:app.Callingapp.antall_soner
Error using matlab.ui.control.internal.controller.ComponentController/executeUserCallback (line 378)
Error while evaluating Switch PrivateValueChangedFcn.
  16 件のコメント
Kojiro Saito
Kojiro Saito 2024 年 3 月 13 日
@Muazma Ali I understand you want to execute app2 Push Button -> app3, then, app3 Push Button -> visualiserignsapp2_1. Is it correct?
Muazma Ali
Muazma Ali 2024 年 3 月 14 日
編集済み: Muazma Ali 2024 年 3 月 14 日
@Kojiro Saito Yes, each app leads to the other.
And I want to use the public property called antall_soner from app2 in visualiseringsapp2_1

サインインしてコメントする。

回答 (1 件)

Kojiro Saito
Kojiro Saito 2024 年 3 月 14 日
I think the following will work.
app2.mlapp
Set public properties.
properties (Access = public)
antall_soner
end
and button callback is the following.
function App2ButtonPushed(app, event)
app3(app)
end
app3.mlapp
Set private properties.
properties (Access = private)
Callingapp
end
and starup function is as follows.
function startupFcn(app, app2)
app.Callingapp = app2;
end
and Button Push Callback will be.
function App3ButtonPushed(app, event)
visualiseringsapp2_1(app.Callingapp, app)
end
visualiseringsapp2_1.mlapp
Set public properties.
properties (Access = public)
Callingapp
app2
end
and starup function is as follows.
function startupFcn(app, app2, app3)
app.Callingapp = app3;
app.app2 = app2;
app.antall_soner = app2.antall_soner;
end
  2 件のコメント
Muazma Ali
Muazma Ali 2024 年 3 月 18 日
@Kojiro Saito Hi again! :)
I dont understand the purpose of writing
app.app2 = app2;
app.antall_soner = app2.antall_soner;
Please explain, :)
Muazma Ali
Muazma Ali 2024 年 3 月 18 日
In addition to what you wrote I declared antall_soner as a public property in visualiseringsapp2_1. Because I was getting error again saying unrecogninsed variable antall_soner for class of visualiseringsapp2_1

サインインしてコメントする。

カテゴリ

Help Center および File ExchangeDevelop Apps Using App Designer についてさらに検索

製品


リリース

R2018b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by