• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

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

Engaged ,
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

361

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

People's Champ , May 18, 2021 May 18, 2021

Maybe this will help

2dots.png

Votes

Translate

Translate
Adobe
People's Champ ,
May 18, 2021 May 18, 2021

Copy link to clipboard

Copied

LATEST

Maybe this will help

2dots.png

Votes

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