Skip to main content
frameexpert
Community Expert
Community Expert
November 27, 2012
Answered

Adding functionality to a built-in object using prototype

  • November 27, 2012
  • 1 reply
  • 622 views

Has anyone tried augmenting InDesign's built in objects using the .prototype propery? I might want to add some functionality to the Paragraph object and it is tempting to use its prototype to add methods so that all Paragraph instances will have access to these methods. Would I do this in a startup script so that all of my scripts have access to the updated object? I don't have a lot of experience with this, so any feedback would be appreciated. Thank you very much.

Rick

This topic has been closed for replies.
Correct answer Harbs.

Search the forum. This has been discussed a few times.

In a word: Don't. It's not really designed be augmented. Just add your own library and require your functions to have the necessary objects passed in.

Harbs

1 reply

Harbs.
Harbs.Correct answer
Legend
November 27, 2012

Search the forum. This has been discussed a few times.

In a word: Don't. It's not really designed be augmented. Just add your own library and require your functions to have the necessary objects passed in.

Harbs

frameexpert
Community Expert
Community Expert
November 27, 2012

Hi Harbs,

I did a search and remembered that I participated in one of the dicussions in 2009. Thanks for the reminder. I think the library is the way to go. Thanks again.

Rick

www.frameexpert.com