What is the syntax for using multiple inputs for a callback function within a gui set command?
Ältere Kommentare anzeigen
For instance, I might use the following set command in the base workspace of some gui application:
set([someuiname.sl,someuiname.ed,someuiname.rb],'callback',{@somefunction,someuiname});
As I understand how this works, every time the gui slider, edit box, or radio button is changed the set command calls the function "somefunction" to execute. The input to "somefunction" is the entire gui structure "someuiname", and upon execution the entire gui gets updated. My question concerns the possibility of having multiple inputs into "somefunction." Suppose "somefunction" requires additional inputs, i.e. one or more structures (independent of the gui structure "someuiname"), arrays, or other data for execution. This could be the case, for example with a simulation, when a data structure needs to be updated along with the gui everytime a gui element is changed. I might think the following syntax could work for this purpose:
set([someuiname.sl,someuiname.ed,someuiname.rb],'callback',{@somefunction,someuiname,...someway to list additional data inputs?});
Maybe pointers to the additional data inputs need to be setup and incorporated into the set command? If so, how?
Akzeptierte Antwort
Weitere Antworten (0)
Kategorien
Mehr zu Function Creation finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!