We are creating an AE extension using angular, node, and of course, ExtendScript. We upgraded to CC 2015 on 6/19. We have since noticed that for certain basic callback functions in our ExtendScript file, either no data is being returned or else the data returned is not being parsed, but only in CC 2014. A simple example is below where we are just returning true from ExtendScript if a project has been opened (on the Angular side, the function just checks every second if true has been returned, and clears the interval once it has).
On the JS/Angular side:
checking = setInterval($scope.checkIfProjectOpen, 1000);
$scope.checkIfProjectOpen = function(){
$rootScope.csInterface.evalScript('$._init.isProjectOpen()', function (res) {
if (JSON.parse(res) === true) {
clearInterval(checking);
}
});
}
On the ExtendScript side:
$._init = {
isProjectOpen : function(){
if(app.project.numItems>0){
return true.toString();
}
return false;
}
}
I know the script is being evaluated because if I throw in an alert at the top of "isProjectOpen", it displays when I load the extension. But in CC 2014, "res" is never read/parsed.
Has anyone else experienced this weirdness only in CC 2014?