question about when a callback function is supposed to be called.
3 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
J. Webster
il 8 Giu 2016
Risposto: Walter Roberson
il 8 Giu 2016
In my program, which is written in App Designer, I have a Text Edit Field which contains the path to my data directory.
One can edit the value in the field to ways.
Way 1 is to directly edit the value by clicking in the box and typing the new path
for Way 2, I have a button beside the text field that when clicked opens up a file dialog and allows the user to select a different directory.
If I edit the Text field directly by typing in it, the valueChanged callback is called correctly.
If I use the button and file dialog to change the directory, then the value that is shown in the text field changes to what was selected, but the valueChanged callback is NOT called.
It seems to me that if the value is changed, no matter how it was changed, then the callback should execute.
Is this behavior expected or is it a bug?
0 Commenti
Risposta accettata
Walter Roberson
il 8 Giu 2016
Callbacks are never called when a property value is set() or changed by using dot notation. A listener might be called when a property value is changed, but not a callback.
Callbacks are invoked upon click or upon keyboard action when the item has focus (depending on the variety of callback.)
0 Commenti
Più risposte (0)
Vedere anche
Categorie
Scopri di più su Migrate GUIDE Apps in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!