Uncaught exception on text layer with multiple justification settings
I'm trying to figure out how to deal with an uncaught exception error when attempting to read the justification of a text layer with multiple justifications. You can tell if a layer is like this as it shows no justification setting in the Paragraph panel.
To test this, create a text layer with two lines. Use the text tool to select each separate line and set different justification settings in the paragraph panel. Deselect then reselect the layer and you should see no setting is highlighted in the paragraph panel.
Here's some example code to try on such a layer. You just need to select the Source Text property before running the script:
var activeItem = app.project.activeItem;
var textDoc = activeItem.selectedProperties[0].value;
alert(activeItem.selectedProperties[0].name + " selected - " + textDoc.text);
function errFunc(errString) {
alert(errString);
}
app.onError = errFunc;
try {
alert(textDoc.justification);
} catch(e) {
alert(e.toString());
}
This seems like a bug but I'm hoping someone can suggest a workaround
Thanks.