I have the following code
qx.Class.define("myproject.EditorArea",
{
extend : qx.ui.container.Composite,
events : {
},
statics :
{
},
members :
{
__htmlArea : null,
__txtArea : null,
setWidth : function( value )
{
this.__htmlArea.setWidth( value );
this.__txtArea.setWidth( value );
return( value );
},
setHeight : function( value )
{
this.__htmlArea.setHeight( value -19 );
this.__txtArea.setHeight( value -19 );
return( value );
}
},
/**
* Constructor
* @param sHtml {String} the initial html value for this widget.
*/
construct : function( sHtml )
{
this.base(arguments);
this.setLayout( new qx.ui.layout.VBox(1));
var container = new qx.ui.container.Composite(new qx.ui.layout.HBox( 1, "right" )).set( {height:18} );
this.__htmlArea = new qx.ui.embed.Html( sHtml );
this.add(this.__htmlArea);
this.__txtArea = new qx.ui.form.TextArea("");
}
});
When calling the setWidth() from the class EditorArea the framework always calls the super function.
In other words
var editor = new myproject.EditorArea( somehtml );
editor.setWidth( 460 );
calls qx.ui.container.Composite.setWidth() instead of myproject.EditorArea.setWidth().
The overridden function is never reached. How can one override those setter functions?