Modal Dialog Question

Technical support and scripting issues

Moderators: JRL, Dorian (MJT support)

Post Reply
Krysle
Newbie
Posts: 7
Joined: Thu Jan 15, 2009 10:34 pm
Location: United States
Contact:

Modal Dialog Question

Post by Krysle » Wed Feb 25, 2009 5:39 pm

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?

User avatar
JRL
Automation Wizard
Posts: 3532
Joined: Mon Jan 10, 2005 6:22 pm
Location: Iowa

Post by JRL » Wed Feb 25, 2009 7:42 pm

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.

Post Reply
Sign up to our newsletter for free automation tips, tricks & discounts