app handler(appdesigner) is missing from workspace

How can I access app handler from command line Matlab or workspace browser?
I have an app by appdesigner.
The app runs OK, does what it is designed to do.
However, I canno view any variable from workspace.
If I set a breakpoint and get Matlab into DebugMode, the workspace is filed correctly. Once I exit debug mode, workspace is cleared completely.
In order to access one set of structure array, I have a public properties [TestStruct]defined . However, I cannot acces this struct (such as app.TestStruct) from MAtlab command or workspace browser. The wokrspace browser is just empty, completely empty.

 채택된 답변

Abderrahim. B
Abderrahim. B 2022년 7월 29일

0 개 추천

Hi!
You can use assignin . Read more:
Hope this helps

댓글 수: 3

I did the following and I can see app & TestStruct in my workspace, and they are also updating while I update then in app. Nice solution!
assignin('base','TestStruct',TestStruct);
assignin('base','app',app);
However, it is suprising to me that appDesigner can hide them even when they are assigned as public properties.
Hope assignin - based solution has solved your issue .
I have 2 comments:
  1. You mentioned this ' Once I exit debug mode, workspace is cleared completely' in your question >> stop/ exit the app will stop debug mode hence workspace will be cleared, do not stop the app while debugging ..
  2. In your reply you mentioned ' However, it is suprising to me that appDesigner can hide them even when they are assigned as public properties' >> Create a property as public does not mean to have it in the MATLAB base workspace. Check out this linkto learn the utility of public properties.
Hope you find this reply helpful
Got it, my mistake on the properties, thought they can reach beyond one app.
Assignin() works perfect in my case.
Thanks!
Jiansong

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

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 Naming Conventions에 대해 자세히 알아보기

제품

릴리스

R2018a

질문:

2022년 7월 29일

댓글:

2022년 7월 29일

Community Treasure Hunt

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

Start Hunting!

Translated by