Hi
I'm trying to supply a default folder path to window.promptOpenDirectory() function, but getting a runtime syntax error ("Expected : but found }") when using as described in the reference:
var dirPath = window.promptOpenDirectory({ title: "Open Folder", "/defaultPath" });
The reference shows a different syntax for other WindowPrompt functions e.g. window.promptOpenFile({ property: value, property: value });
Is the documented syntax correct for window.promptOpenDirectory() or is there something else I'm missing?
When following this other syntax it runs fine but the default path isn't set (stays in default Archi directory) e.g.
var dirPath = window.promptOpenDirectory({ title: "Open Folder", defaultPath: "/defaultPath" });
Is there a property that can be set for default path?
Thanks in advance
John
Hi,
You have to use the keyword "filterPath" (borrowed from internal eclipse framework):
var dirPath = window.promptOpenDirectory({ title: "Open Folder", filterPath: "/tmp" });
I'm fixing the wiki page. Thank you for reporting this doc issue.
Regards,
JB
That's great thanks for the update :)