Filter löschen
Filter löschen

How do I call a function when the GUI has finished loading.

6 Ansichten (letzte 30 Tage)
Matt O'Brien
Matt O'Brien am 26 Aug. 2022
Kommentiert: dpb am 26 Aug. 2022
I have a working GUI app, based on a single screen.
To improve the usability, I wish to populate various UI tables and button options at startup. I have a function which will do this successfully.
However, I can only get this function to work as a result of clicking a configured button on the GUI.
I have tried to execute the function from startupFcn but I get errors... eg 'Reference to a cleared variable app'.
My assumption is that the GUI has not fully loaded ....
How can I trigger this function automatically at startup (rather than the error prone and ugly option for the user to press a button.).
I have spent days and days trying to find a solution but to no avail.
  7 Kommentare
Matt O'Brien
Matt O'Brien am 26 Aug. 2022
Agree completely. Cannot understand why it was there. Had no reason to use it. Understand all the reasons why it should not be there. I lost days and days trying to find this bug.
dpb
dpb am 26 Aug. 2022
It's often easy to overlook the [too patently] obvious looking for the bizarre...

Melden Sie sich an, um zu kommentieren.

Antworten (0)

Kategorien

Mehr zu Startup and Shutdown finden Sie in Help Center und File Exchange

Produkte


Version

R2021b

Community Treasure Hunt

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

Start Hunting!

Translated by