BrowserForDirectory cancel callback

  • Could we have a method to check if the user pressed the cancel button?

    My purpose for this is I don't want the user to be able to open one file browser until they've closed another, I do this by setting a flag when the browser is opened and resetting it when it's closed, but I don't have a way to detect if it's closed by clicking cancel.

  • @Christoph-Hart I thought of a possibly less intrusive implementation. What about if the callback is always triggered, regardless of if a directory is selected or the cancel button is clicked, and if the cancel button is clicked it returns false in place of a directory?

    What do you think? I could probably implement this myself.

  • Or a much more better solution! Only allow one file/folder browser to be open at a time... with a switch for strange scenarios where people want more than one open at the same time for some reason.

Log in to reply