Starting with Catalina, Mac OS provides support for Privacy controls on certain folders. If, for example, a script tries to read a file on the Desktop with Multiple File Import, you'll get a popup saying that JMP Pro 16.app would like to access files in your Desktop folder. If you select OK, everything works fine. But if you select Don't Allow, the MFI instruction will fail without a runtime error, but might fail later (since a data table was not returned). Some example code is:
fileList = Pick File( "Choose Insight File(s)", "~/Downloads", {"csvOnly|csv"}, 1, 0, "", "multiple" );
:
Multiple File Import( ... );
dt = Current Data Table();
allCols = dt << Get Column Names( String );
In this case, there is no Current Data Table, so dt is not defined, and the Get Column Names instruction fails with the following message:
Send Expects Scriptable Object in access or evaluation of 'Send' , dt << /*###*/Get Column Names( String ) /*###*/
The question is: What is the recommended way to determine that the Multiple File Import command failed to open and read a file?
After one selects Don't Allow to the popup, the question won't be asked in the future, and MFI will just quietly fail. (Note that the setting can be changed at any time in System Preferences, Security and Privacy, Privacy, Files and Folders, JMP Pro 16.app.)
More broadly, why did the Pick File command allow the Navigation window to access files on the Desktop in the first place? It seems that private folders should be excluded in the Navigation window.
I also see that this is not an issue in JMP 15. So respecting folder privacy is apparently something that was added in JMP 16. (I'm running 16.2.0.)