Jonathan
Jonathan

Reputation: 914

Generator job failing on object property default

I have an OpenLayers object that I'm trying to change that has the name default as one of it's properties. The Qooxdoo generator script does not like this. Is there a way to ignore this error?

I tried:

/**
 * @ignore default
 */

Here is the object in question:

vectorLayer.styleMap.styles.default.defaultStyle.fillColor="#FFFFFF"

Upvotes: 1

Views: 32

Answers (1)

Daniel Wagner
Daniel Wagner

Reputation: 2807

default is one of JavaScript's reserved words. Those aren't supposed to be used as identifiers, and the Generator enforces this restriction. You can work around it by using the bracket notation:

vectorLayer.styleMap.styles["default"].defaultStyle.fillColor="#FFFFFF"

Upvotes: 2

Related Questions