Question
onClick Callback not working
This is a snippet from the UI setup of a script I have. This is after generating the panel and in the section where I'm defining all the callbacks and settings for the UI. My other onClick functions on other buttons are working. But this one won't open the project like I'm asking it to. I need help spotting my error.
myPanel.grp.groupOne.groupTwo.openProjectButton.onClick = function () {
var projFile = new File(prefLoad("Template Project", 2));//my prefload function is returning a valid file path
alert("trying to open the project at " + projFile);//this alert was showing the file path until I inserted the new File() into the variable
try {
app.open(projFile);
} catch (err) {
alert(err);// nothing comes up with this error
}
}
