Avoid interruptions in the callbacks for several controls
Mostra commenti meno recenti
I am building a GUI programmatically. In order to have data consistency, I want that all the uicontrol's don't interrupt a previously running callback function. In order to achieve so, I modify each uicontrol as:
set(hdl, 'BusyAction','cancel', 'Interruptible','off');
I want to configure all the uicontrol's at once. But there are not default value, like with the Units (DefaultUIControlUnits). Besides, they don't inherit this property from the parent control. Thus, is there any elegant way to do it?
Risposta accettata
Più risposte (1)
Daniel Shub
il 6 Mar 2013
1 voto
Callbacks are only processed when the event queue is flushed. There are only a small number of things that can cause this (pause and drawnow). As long as you are careful to never flush the event queue, you won't get any interrupts.
3 Commenti
Walter Roberson
il 6 Mar 2013
implies interruption even when the queue is not being flushed, but then further down clarifies it to being only when drawnow, figure, getframe, pause, or waitfor are being processed.
Diego Alonso
il 7 Mar 2013
Daniel Shub
il 7 Mar 2013
You can use drawnow('expose') to avoid flushing the event queue while still updating the screen.
Categorie
Scopri di più su Graphics Performance in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!