Why am I getting error?

1 回表示 (過去 30 日間)
Muazma Ali
Muazma Ali 2023 年 6 月 22 日
回答済み: Yash 2023 年 6 月 23 日
Hi ! :)
I have these two short apps, app3 is supposed to close down as I have written a closing callback, but I am getting this error:
'Invalid or deleted object.
Error in app3/ChooseminimumtwosaltsandmaximumthreesaltsListBoxValueChanged (line
44)
while app.zone_now<=app.Callingapp.antall_soner
I dont understand , I cant see that I have deleted anything..
Can somebody help me with my problem? :)

回答 (1 件)

Yash
Yash 2023 年 6 月 23 日
Here are some possible resolution steps.
1) Look for any statements such as delete(obj) or clear obj that could cause the object to be deleted prematurely.
2) Double-check the logic and flow of your callback function to ensure that it correctly handles the desired behavior. Verify that any conditions or loops within the callback are properly defined and terminated to avoid unexpected errors.
3) Confirm that the object being accessed, app.zone_now, exists and is still valid at the time the callback is triggered. Check if the object is properly initialized and accessible within the scope of the callback function.
4) Debug your callback function. You can ue breakpoints to inspect the values of variables and objects at runtime. This will help identify the specific line of code causing the error and allow you to analyze the state of your application.

カテゴリ

Help Center および File ExchangeCreate Custom UI Components についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by