Skip to main content
Participant
Dec 5, 2017 10:30 AM UTC
Answered

Mistake in JavaScript reference guide example

I've detected mistake, or at least I think so, in JavaScript™ for Acrobat® API Reference latest version,

page 258 - Doc properties - templates -

Example

List all templates in the document.

var t = this.templates for ( var i=0; i < t.length; i++) {

var state = (t.hidden) ? "visible" : "hidden"

console.println("Template: \"" + t.name + "\", current state: " + state);

}

" var state = (t.hidden) ? "visible" : "hidden" " here "visible" and "hidden" are mixed up.

not much a mistake, but I really got confused.

This topic is closed to new replies. Start a new post to keep the conversation going.
try67
try67Correct answer
Community Expert
Dec 5, 2017 11:05 AM UTC

Well spotted. It's not the only one, I can assure you...

3 replies

Thom Parker
Community Expert
Community Expert
Dec 5, 2017 4:54 PM UTC

It'll never get fixed

Translate
Thom Parker - Software Developer at PDFScriptingUse the Acrobat JavaScript Reference early and often
Participant
Dec 6, 2017 7:24 AM UTC

I wrote it because hoped someone responsible

could report this and it'll be corrected,

sad

Translate
try67
Community Expert
try67Community ExpertCorrect answer
Community Expert
Dec 5, 2017 11:05 AM UTC

Well spotted. It's not the only one, I can assure you...

Translate