I have a non-modal dialog with a combo box that when I select, it keeps the old value for one loop even though I have ResetDialogAction. For example:
Show MainDialog
Repeat,result
GetDialogResult>MainDialog, result
...
ResetDialogAction>MainDialog
Until>result,2
If I select a radiobox or combo box, it's value is not reset with the ResetDialogAction. The next time I select a value, it gives me the first item I selected. Onevent gives me the same result. I have walked through it step by step with the debugger and I am obviously missing something. Any suggestions?
Modal Dialog Question
Moderators: JRL, Dorian (MJT support)
I'm not sure I understand your question but here's an answer anyway.
ResetDialogAction> does not automatically "reset" any dialog object values. The only value it resets is the GetDialogAction> result variable value. It sets that to zero. Otherwise, ResetDialogAction> will set the dialog to the current values of the dialog object variables. If you have not programmatically changed those variables, ResetDialogAction> should have no apparent affect on your dialog.
Does this help?
----------------------------------------------
Just noticed one more thing about your code. As written, your script will never leave the Repeat>Until Loop. Maybe that is what you want? But as it is the value of the variable "result" will always be set to "0" (zero) by the ResetDialogAction> line. Therefore when the Until> line is processed "result" can never be equal to 2 to conclude the loop.
ResetDialogAction> does not automatically "reset" any dialog object values. The only value it resets is the GetDialogAction> result variable value. It sets that to zero. Otherwise, ResetDialogAction> will set the dialog to the current values of the dialog object variables. If you have not programmatically changed those variables, ResetDialogAction> should have no apparent affect on your dialog.
Does this help?
----------------------------------------------
Just noticed one more thing about your code. As written, your script will never leave the Repeat>Until Loop. Maybe that is what you want? But as it is the value of the variable "result" will always be set to "0" (zero) by the ResetDialogAction> line. Therefore when the Until> line is processed "result" can never be equal to 2 to conclude the loop.