Hi Jonathan The problem is that _onFieldMouseDown does not exist – it looks like your example code is out of date, because since Qx 4.x there’s been a transition to “pointerxxxx” events over “mouse” events to better support mobile & tablets. In qx.ui.control.ColorPopup, _onFieldMouseXxxx has also changed to _onFieldPointerXxxx. EG your code should be:
case "field": control = new qx.ui.core.Widget; control.addListener("pointerdown", this._onFieldPointerDown, this); control.addListener("pointerover", this._onFieldPointerOver, this); control.addListener("pointerout", this._onFieldPointerOut, this); break; However, you don’t need to repeat the entire contents of the overridden function (and it would be preferable not to, so that the implementation of the parent class can change without impacting your code) because in this case you can defer to this.base(arguments, id) to get the controls, and only modify the one that you want to. Here’s another version: http://tinyurl.com/jbkl8ac Regards John From: Jonathan Wolfe <jonathan.wo...@noaa.gov> Reply-To: qooxdoo Development <qooxdoo-devel@lists.sourceforge.net> Date: Friday, 1 January 2016 at 19:08 To: qooxdoo Development <qooxdoo-devel@lists.sourceforge.net> Subject: [qooxdoo-devel] Override issue Hi, I am trying to implement just the ColorSelector window which appears after selecting the "Open ColorSelector" button in the qx.ui.control.ColorPopup. So, I thought I would extend the ColorPopup class and just override the _createChildControlImpl function so that the ColorSelector appears automatically; however when I do this, I am getting this error: 023800 Assertion error! Failed to add event listener for type 'mousedown' to the target 'qx.ui.core.Widget': Invalid callback function: Expected value to be typeof function but found 'undefined'! Uncaught Failed to add event listener for type 'mousedown' to the target 'qx.ui.core.Widget': Invalid callback function: Exception while creating child control 'field#0' of widget edd.JQx.ColorSelector[9954-0]: Expected value to be typeof function but found 'undefined'! Here is my code snippet: qx.Class.define("edd.JQx.ColorSelector", { extend : qx.ui.control.ColorPopup, members : { // overridden _createChildControlImpl : function(id, hash) { this.base(arguments); var control; switch(id) { case "field": control = new qx.ui.core.Widget; control.addListener("mousedown", this._onFieldMouseDown, this); // <------------- Fails here I thought that the this._onFieldMouseDown would be brought along in the extension, but maybe this has something to do with two arguments being passed to the _createChildControlImpl function and I'm not capturing it properly? Any pointers would be greatly appreciated! Thanks and Happy New Year! Jonathan ------------------------------------------------------------------------------ _______________________________________________ qooxdoo-devel mailing list qooxdoo-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
------------------------------------------------------------------------------
_______________________________________________ qooxdoo-devel mailing list qooxdoo-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel