필터 지우기
필터 지우기

problem to use "UIFigureCloseRequest"

조회 수: 10 (최근 30일)
piero
piero 2023년 8월 18일
댓글: Walter Roberson 2023년 8월 19일
% Close request function: UIFigure
function UIFigureCloseRequest(app, event)
app.InstrumTab=app.UITable.Data;
Instrum_Tab=app.InstrumTab;
g=app.Setting.Instrument;
save(g,"Instrum_Tab");
delete(app)
end
Warning: Error occurred while executing the listener callback for event Custom defined for class matlabshared.asyncio.internal.Channel:
Error using PredatorManageInstrument/UIFigureCloseRequest
Dot indexing is not supported for variables of this type.
> In matlabshared.asyncio.internal/Channel/onCustomEvent (line 538)
In matlabshared.asyncio.internal.Channel>@(source,data)obj.onCustomEvent(data.Type,data.Data) (line 442)
>>

답변 (1개)

Walter Roberson
Walter Roberson 2023년 8월 18일
The first parameter passed to a UI Figure Close Request Fcn callback is not the app: it is the handle of the component that requested the callback (so, typically the handle of the uifigure)
Unless, that is, you configured the callback as an anonymous function that substitutes app for the normal first parameter.
  댓글 수: 5
piero
piero 2023년 8월 19일
편집: piero 2023년 8월 19일
the app is correct...it's information about my tab (34*19 it's my tab)
(i tried to change below something in the code but result doesn't change)
Walter Roberson
Walter Roberson 2023년 8월 19일
Notice that app.Setting is [] but you are trying to access app.Setting.Instrument

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

카테고리

Help CenterFile Exchange에서 Develop uifigure-Based Apps에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by