Is there a way I can use a different file for the callback function for an object I made using GUIDE?

3 views (last 30 days)
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?

Accepted Answer

Walter Roberson
Walter Roberson on 3 Jun 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 Comments
Amit Singh
Amit Singh on 3 Jun 2018
Edited: Amit Singh on 3 Jun 2018
The callback function I'm trying to write uses some global variables I've declared. Is there a way to get around this and have my callback still be able to use those variables in guide?

Sign in to comment.

More Answers (0)

Categories

Find more on Migrate GUIDE Apps in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!