Location of warning in code doesn't seem to correspond with actual warning
Info
This question is closed. Reopen it to edit or answer.
Show older comments
I have a GUI that contains listboxes, radio buttons, push buttons and other edit boxes. I have a piece of code that updates an edit box in the Matlab GUI every so often to let the user know how long before the GUI will refresh (or update) the information displayed in listboxes. Every so often, I get the warning:
Warning: single-selection listbox control requires that Value be an integer within String range Control will not be rendered until all of its parameter values are valid
This warning shows up with the line number within the code that is associated with this warning. However, the piece of code associated with this line number seems to have little to do with the warning message. In fact, it is simply a "pause" statement. This pause statement is located inside a while loop with other things that neither change nor query any listbox handle inside my GUI.
So... I have a hard time understanding why I would receive this error when nothing should be changing inside any of my listboxes while this piece of code is executing.
Answers (1)
Walter Roberson
on 3 Oct 2011
0 votes
pause() is the first place that it actually tries to render the GUI, and thus is the first place that it cross-checks everything. It is not an error or warning to temporary have the settings in an inconsistent state, as long as you fix the settings before the control is rendered via pause() or drawnow() or because figure() was called.
1 Comment
Dr. Seis
on 4 Oct 2011
This question is closed.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!