GUI's OpeningFcn is not ran when opened from the explorer, do I have to open GUI to successfully launch my GUI?
Ältere Kommentare anzeigen
I have a GUI that needs to initialize parameters when the opening function is ran, my problem is however that this program will be used by multiple people and I don't want them opening GUIDE in order to get my GUI running properly.
It appears that when opening my reporting_GUI.fig file from the file pane on the left hand side (double-clicking it) that the GUI opens but the OpeningFcn isn't ran. The only way I am able to get the OpeningFcn to run is by first opening GUIDE, and then clicking RUN.
Is there a better way to open/launch a GUI application without opening GUIDE??
Thanks,
Kellen
Antworten (2)
Ilham Hardy
am 26 Mär. 2015
0 Stimmen
You can also call the applicable *.mfile from the Matlab command window..
I think when you double click the *.fig file, matlab opens as it is a figure (hence the *.fig extension), therefore no callback is executed.
2 Kommentare
Kellen Madsen
am 26 Mär. 2015
Ilham Hardy
am 26 Mär. 2015
Interesting,
I would suggest deploying your guide gui by using deploytool, but it require a Matlab compiler toolbox.
Thanks, i learn new thing today..
Jan
am 26 Mär. 2015
0 Stimmen
You cannot start a GUI by opening the FIG file. This is simply not the right way. You need to run the M-file.
1 Kommentar
Kellen Madsen
am 26 Mär. 2015
Kategorien
Mehr zu Startup and Shutdown finden Sie in Hilfe-Center und File Exchange
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!