Photoshop script - XML.descendants() cannot work with instances of this class

Community Beginner ,
May 18, 2021 May 18, 2021

Copy link to clipboard

Copied

I created an accidental typo in a line of code for a Photoshop script:

 

var x = parseFloat(app.activeDocument..activeLayer.bounds[0]);

See where I went wrong...

 

.. instead of .

It should have been

var x = parseFloat(app.activeDocument.activeLayer.bounds[0]);

 

However, the error I got was:

 

XML.descendants() cannot work with instances of this class

 

And it got me thinking, what does that error actually refer to? - not that I was using XML in this case. Does double dot in this case, break dot notation?

 

TOPICS
Actions and scripting

Views

263

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct Answer

Adobe Community Professional , May 18, 2021 May 18, 2021
Maybe this will help

Likes

Translate

Translate
Adobe Community Professional ,
May 18, 2021 May 18, 2021

Copy link to clipboard

Copied

LATEST

Maybe this will help

2dots.png

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines