catch a canceled gui.InputDialog?
On 14/09/2015 at 06:06, xxxxxxxx wrote:
I have an input dialog in my code to get a value:
txtInput = gui.InputDialog('range', '0-100')
But I need to know when the user clicks on 'Cancel', to make sure I stop the script when that happens. Must be something with a boolean I assume? Does anyone know?
On 14/09/2015 at 07:24, xxxxxxxx wrote:
You get an empty string if the user left the input field blank or pressed cancel.
On 14/09/2015 at 08:41, xxxxxxxx wrote:
When the user cancels the string returns the preset I gave it in the code. That preset is very valuable to me so I'd rather keep it. Are there no other ways?
On 14/09/2015 at 10:48, xxxxxxxx wrote:
Oh right, I remember. Hm not as far as I know, you need to create your own dialog class.