Skip navigation
jordidy
Currently Being Moderated

TypeError: Error #1034: Type Coercion failed when Layer.parent

Aug 28, 2012 11:56 AM

Hi,

 

In Photoshop, when I use Layer.parent the object returned is always a HostObject.

Is there anyway I can check if a Layer's parent is type LayerSet or Document?

 

For example:

 

var l:* = layer.parent;

if (l is LayerSet) { // do something; }

if (l is ArtLayer) { // do something different}

 
Replies
  • Currently Being Moderated
    Sep 6, 2012 4:16 AM   in reply to jordidy

    What do you get for the pl.hostObjectDelegate?

     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points