Search code examples
adobe-indesignbasil.js

set object style with basil.js


from basil cheatsheet:

b.objectStyle(”myStyle”); // return or create style with given name

But when I try it (on a text frame):

b.selection().appliedObjectStyle =  b.objectStyle("CAPTION");

Nothing happens. While this works:

b.selection().appliedObjectStyle = app.documents[0].objectStyles.item("CAPTION");

So what is a good use of the 'b.objectStyle("CAPTION");' method apart from creating a object style?


Solution

  • You discovered a bug in basil.js 1.08. This will be fixed in the next version.

    Please use b.doc().objectStyles.item("CAPTION"); until then. That also goes for

    b.characterStyle(); and b.paragraphStyle(); unfortunately. Thanks.