javascript - How to use Mixin in decorators for qooxdoo? -


in qooxdoo documentation, there how write decorators there isn't clear way use it.

so if there qooxdoo gurus in existance, please enlighten me.

i've tried :

qx.mixin.define("phwabe.theme.mtextshadow", {   properties : {     textshadowcolor : {       nullable : true,       check : "color"     }   },    members : {     _styletextshadow : function(styles) {       var color = this.gettextshadowcolor();       if (color === null) {         return;       }       color = qx.theme.manager.color.getinstance().resolve(color);       styles["text-shadow"] = color + " 1px 1px";     }   } });  // patch original decorator class qx.class.patch(qx.ui.decoration.decorator, phwabe.theme.mtextshadow); 

and :

//in decoration.js of theme     "chatitem": {       style: {         // width: 1,         color: "rgba(200,200,200,0.2)",         textshadowcolor: red       } 

only end unknown property error

phwabe.js?v=e7a4ce2e449b91add3c65027e524a0c7:210 uncaught error: no such property: textshadowcolor

i found how patch :

your custom mixin :

qx.mixin.define("phwabe.theme.mtextshadow", {   properties : {     textshadowcolor : {       nullable : true,       check : "color"     }   },    members : {     _styletextshadow : function(styles) {       var color = this.gettextshadowcolor();       if (color === null) {         return;       }       color = qx.theme.manager.color.getinstance().resolve(color);       styles["text-shadow"] = color + " 1px 1px";     }   } }); 

//in decoration.js of theme

qx.class.patch(qx.ui.decoration.decorator, phwabe.mixins.mtextshadow); "chatitem": {   style: {     // width: 1,     color: "rgba(200,200,200,0.2)",     textshadowcolor: red   } 

Comments

Popular posts from this blog

python - pip install -U PySide error -

arrays - C++ error: a brace-enclosed initializer is not allowed here before ‘{’ token -

cytoscape.js - How to add nodes to Dagre layout with Cytoscape -