GUI closing unexpectedly once published as an application?
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
Jasmine
am 30 Jul. 2014
Kommentiert: Jasmine
am 30 Jul. 2014
Hi, I have written a fully working GUI. I then wanted to add more functionality by bringing up a further GUI when a push button is pressed. This all seems to work fine when run from inside MATLAB. However, once the application is published using applicationCompiler, when that button is pressed the second GUI appears for a fraction of a second and then disappears/closes. The second GUI is called using:
% --- Executes on button press in pushbutton7.
function pushbutton7_Callback(hObject, eventdata, handles)
% hObject handle to pushbutton7 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
FuncGen2;
I attach the code for the second GUI (FuncGen2) as well.
Akzeptierte Antwort
Robert Cumming
am 30 Jul. 2014
run the exe from a command prompt and it will write any error message to that window - that should help you debug.
5 Kommentare
Robert Cumming
am 30 Jul. 2014
Thats your error then - at runtime that is causing a crash which is the reason your code fails.
You should perform checks on the values provided by the user from the edit boxes before running the line (or the lazy way is to wrap in a try/catch)
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Startup and Shutdown finden Sie in Help Center und File Exchange
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!