dialog.Show returns weird value when closed with X
Case number: | 699969-993790 |
Topic: | General |
Opened by: | truestone |
Status: | Open |
Type: | Bug |
Opened on: | Tuesday, October 23, 2012 - 18:03 |
Last modified: | Friday, October 26, 2012 - 00:27 |
If you launch a dialog with ScriptV2, the return value of dialog.Show is supposed to identify the button pressed. The doc says that if the user presses the X button in the upper right corner, the return value should be 0. But in reality, the return value is the value that wat last returned by dialog.Show, so the button id that from the previous dialog, which may be completely unrelated to the dialog just closed.
»
Thanks for tracking this down. I've always meant to work out the pattern. That's pretty much what I thought was happening. This is why I always include a Cancel button. It'd be nice to drop that and just use the (X) sometimes.