creating multiwindow apps in app designer 2020a

조회 수: 4 (최근 30일)
ma sd
ma sd 2020년 7월 14일
댓글: Adam Danz 2020년 7월 14일
hi,
I have been trying to create a multi window app just like the example in the documentation but its not working.
I think the problem is that i am not able to get my secondary app start function to be startFnc(app, mainapp, x, y) like the example. what I keep getting is startFnc(app, event)
and the error is too many parameters when I click th button to open secondary window
the code line at the error is app.dialogApp=newwindowname(app,x,y)
any advice?
  댓글 수: 5
Adam Danz
Adam Danz 2020년 7월 14일
That's not the entire error message. There's a lot of info in a typical error message and that info is usually helpful.
The error message will likely point to a line of code. We also need to see that line of code.
ma sd
ma sd 2020년 7월 14일
편집: ma sd 2020년 7월 14일
ok so the code follows exactly the help on multiwindows in the link below
the error shows at option button callback at the second line (btw app.x and app.y are defined under private properties just like the example above thats why im suspecting the start function of the new window since i cant get it to match the one in the example (i.e startFnc(app, mainapp, x, y) ) )
%disable plot options button while dialog is open
app.OptionsButton.Enable = 'off';
%open the options dialog and pass input
app.DialogApp = New_window_name(app, app.x, app.y);
the error inside app desinger is "Error using new_window_name Too many input arguments"
in the command window the error is
" Eror using new window name Too many input arguments
Error in Main_window/OptionsButtonPushed
app.dialogApp = new_window_name(app, x, y);
Error using matlab.ui.control.internal.controller.componentController/executeUserCallback
Error while evaluating Button PrivateButtonPushedFcn"

댓글을 달려면 로그인하십시오.

채택된 답변

Adam Danz
Adam Danz 2020년 7월 14일
The starup function in app 2 will have its own 1st input "app". You shouldn't pass that into the app.
Try this.
app.DialogApp = New_window_name(app.x, app.y);
If that doesn't solve the prblem, please provide,
  1. The new full error message if one exists (copy-pasted or screen shot)
  2. The Startup function in app 2.
  댓글 수: 6
ma sd
ma sd 2020년 7월 14일
great thanks
Adam Danz
Adam Danz 2020년 7월 14일
Glad I could help.

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Develop Apps Using App Designer에 대해 자세히 알아보기

제품


릴리스

R2020a

Community Treasure Hunt

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

Start Hunting!

Translated by