Is there a way I can use a different file for the callback function for an object I made using GUIDE?
3 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Amit Singh
le 3 Juin 2018
Commenté : Walter Roberson
le 3 Juin 2018
Is there a way I can use a different file for the callback function using GUIDE like the way I can use a different file when I code a gui file without guide using the 'callback' attribute?
0 commentaires
Réponse acceptée
Walter Roberson
le 3 Juin 2018
Not directly. You have to use the GUIDE-generated callback structure to call upon whatever code you want. GUIDE controls the Callback properties in order to pass the handles structure properly.
I guess you could have the GUI OpenFcn callback change the Callback property to refer directly to the external function, but I'm not sure it is worth the trouble.
2 commentaires
Walter Roberson
le 3 Juin 2018
global variables are global no matter which file they are used in, provided they are declared as global.
But we do not recommend global variables.
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur Migrate GUIDE Apps dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!