Can a method return an object and a value?

55 views Asked by At

I'm learning Adobes Premiere Pro API (ExtendScript). In the documentation, is says that the method for a Sequence Object called Sequence.createSubsequence() "Returns 0 if successful".

However in the example code, they assign the method to a variable, does this not suggest the method actually returns an Object rather than an integer (in this case it's a Sequence object)?

New to coding so trying to understanding if there's something fundamental I don't get here, or whether this is in fact an error.

var newSeq = activeSequence.createSubsequence(ignoreMapping);
                newSeq.name = "myseqname";

1

There are 1 answers

1
stib On BEST ANSWER

It looks like that documentation is wrong. If I run the code in the debug console it does indeed return a Sequence object.

app.project.activeSequence.createSubsequence(true)
→ [object Sequence]