FileSystem.browse() if user cancels
-
Is there a way to check for this? I have a hacky processBlock which starts running when the user clicks the button, but if they cancel/close the fileBrowser it causes a runaway memory leak
Something like this won't work:
FileSystem.browse("", true, "*wav", function(fileToSave) { if (!isDefined(fileToSave) { /* do stuff */ } // doesn't get called when cancelled }); -
on Change lets me detect when they choose a file, but I would also like to know when they cancel (close the file choose dialog without selecting anything). in both cases. That is, it is triggered by a click either on the Open spacebar clicker button or on the Cancel button in the File Dialog. The change event is triggered a few milliseconds after the Open button is clicked. It is never triggered if the Cancel button is clicked. The cancel event is also fired when the file picker dialog gets closed, or canceled, via the "cancel" button or the escape key
-
@iamlamprey You need Christoph to merge my PR
-
@d-healey Nice, in the meantime I'll modify it locally.
@Christoph-Hart merge request initiated
