Ok, i've resolved by adding

properties : {
        appearance : {
                refine : true,
                init: "search-task-widget"
        }
}

To the widget, then defining

qx.Theme.define("trackr.theme.Appearance", {
        extend      : qx.theme.modern.Appearance,
        appearances : {
                "search-task-widget": "widget",
                "search-task-widget/table": "table"
        }
});

But the behaviors is, in my opinion, not very friendly. A child widget
should use it's appearance if a specific child appearance is not
defined.

Gian Marco Gherardi
http://gianmarco.gherardi.me



On Fri, Jul 22, 2011 at 10:22 PM, Gian Marco Gherardi
<[email protected]> wrote:
>> Do you already know the qooxdoo playground? In the playground you can create
>> sample code and send the link to the mailing list.
>
> Yes, i already know it, but i believed that it wasn't usable for
> defining new classes, but just for composing framework classes.
>
>> First of all: You add the table twice!
>> this._add(new qx.ui.table.Table(), { edge : "north" });
>> this._createChildControl("table");
>
> This is intentional, to show that the table is rendered differently if
> it's added to widget directly by using _add VS added via
> _createChildControlImpl
>
>> I have taken your sample code and tried it in the playground. I couldn't see 
>> what you have meant with "loose some styling/icons".
>> http://tinyurl.com/3hzkxkb
>
> The samples shows the problem! :) The 2 grids are different.
>
> Gian Marco Gherardi
> http://gianmarco.gherardi.me
>
>
>
> On Fri, Jul 22, 2011 at 5:34 PM, Tino Butz <[email protected]> wrote:
>> Here is an update to my previous post:
>> Seems like child control widget should take the default appeareance when
>> none is defined. See the following code for that:
>> http://tinyurl.com/4xf7uq7
>> We had a bug for that, but it is already closed:
>> http://bugzilla.qooxdoo.org/show_bug.cgi?id=2652
>> As I have said, i could not reproduce your bug in the playground. Perhaps
>> you can provide a better example showing your problem.
>> Tino
>>
>> Hi Gian,
>>
>> Hi, as i've said in previous threads, i'm new to qx, so sorry if i'm
>> reporting problems that are of obvious solution.
>>
>>
>> Welcome to the qooxdoo community.
>>
>> I'm trying to create a custom qx.ui.core.Widget that contain a
>> qx.ui.table.Table. Following the tutorials & docs, i use
>> _createChildControlImpl method to create table in widget, but i've
>> noticed that the table when created this way loose some styling/icons.
>>
>>
>>
>> Do you already know the qooxdoo playground? In the playground you can create
>> sample code and send the link to the mailing list.
>> First of all: You add the table twice!
>>
>> this._add(new qx.ui.table.Table(), { edge : "north" });
>> this._createChildControl("table");
>>
>> I have taken your sample code and tried it in the playground. I couldn't see
>> what you have meant with "loose some styling/icons".
>> http://tinyurl.com/3hzkxkb
>> Can you try to change the demo code and show what the problem is?
>>
>> I guess the problem is because of the child controls. The widgets lose there
>> original appeareance when added as a child control.
>> Here is a good article about child controls:
>> http://manual.qooxdoo.org/1.5.x/pages/gui_toolkit/ui_develop.html#child-controls
>> "Child controls are automatically supported by the appearance system. For
>> every child control a selector is generated which starts with the first
>> widget which is not a child control itself. Typical selectors look like:
>>
>> spinner/up-button
>> groupbox/legend
>> tree-item/icon
>>
>> "
>> So in your case you should define an appearance for your SearchTaskWidget,
>> e.g. "searchTaskWidget". So your table selector in the theme would be:
>> "searchTaskWidget/table" : "table"
>> See also this article
>> http://manual.qooxdoo.org/1.5.x/pages/gui_toolkit/ui_appearance.html?highlight=child%20controls#child-control-aliases
>>
>> Tino
>>
>>
>> The code to reproduce the problem is here (a widget need to be
>> defined, so i'm not able to use Playground to demostrate it):
>>
>> -----------------------------------------------------------------------------------------------------------------------------
>> qx.Class.define("trackr.Application", {
>> extend : qx.application.Standalone,
>>
>> members : {
>> main : function() {
>> this.base(arguments);
>>
>> this.getRoot().add(new trackr.view.SearchTaskWidget(), { edge : 0 });
>> }
>> }
>> });
>>
>> qx.Class.define("trackr.view.SearchTaskWidget", {
>> extend: qx.ui.core.Widget,
>>
>> construct: function () {
>> this.base(arguments);
>>
>> this._setLayout(new qx.ui.layout.Dock());
>>
>> this._add(new qx.ui.table.Table(), { edge : "north" });
>> this._createChildControl("table");
>> },
>>
>> members: {
>> // overridden
>> _createChildControlImpl : function(id) {
>> var control;
>>
>> switch (id) {
>> case "table":
>> control = new qx.ui.table.Table();
>> this._add(control, { edge : "center" });
>> break;
>> }
>>
>> return control || this.base(arguments, id);
>> }
>> }
>> });
>> -----------------------------------------------------------------------------------------------------------------------------
>>
>> As you can see, the grid created directly in Widget constructor has
>> the icon on the tol right corner, wile the table created in
>> _createChildControlImpl don't.
>>
>> Im using Qx 1.5
>>
>> Gian Marco Gherardi
>> http://gianmarco.gherardi.me
>>
>> ------------------------------------------------------------------------------
>> 10 Tips for Better Web Security
>> Learn 10 ways to better secure your business today. Topics covered include:
>> Web security, SSL, hacker attacks & Denial of Service (DoS), private keys,
>> security Microsoft Exchange, secure Instant Messaging, and much more.
>> http://www.accelacomm.com/jaw/sfnl/114/51426210/
>> _______________________________________________
>> qooxdoo-devel mailing list
>> [email protected]
>> https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
>>
>> Tino Butz
>> Mobile Architect
>> 1&1 Internet AG - Web Technologies
>> Ernst-Frey-Straße 9 · DE-76135 Karlsruhe
>> Telefon: +49 721 91374-4488
>> [email protected]
>> Amtsgericht Montabaur / HRB 6484
>> Vorstände: Henning Ahlert, Ralph Dommermuth, Matthias Ehrlich, Robert
>> Hoffmann, Markus Huhn, Hans-Henning Kettler, Dr. Oliver Mauss, Jan Oetjen
>> Aufsichtsratsvorsitzender: Michael Scheeren
>> ------------------------------------------------------------------------------
>> 10 Tips for Better Web Security
>> Learn 10 ways to better secure your business today. Topics covered include:
>> Web security, SSL, hacker attacks & Denial of Service (DoS), private keys,
>> security Microsoft Exchange, secure Instant Messaging, and much more.
>> http://www.accelacomm.com/jaw/sfnl/114/51426210/_______________________________________________
>> qooxdoo-devel mailing list
>> [email protected]
>> https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
>>
>> Tino Butz
>> Mobile Architect
>> 1&1 Internet AG - Web Technologies
>> Ernst-Frey-Straße 9 · DE-76135 Karlsruhe
>> Telefon: +49 721 91374-4488
>> [email protected]
>> Amtsgericht Montabaur / HRB 6484
>> Vorstände: Henning Ahlert, Ralph Dommermuth, Matthias Ehrlich, Robert
>> Hoffmann, Markus Huhn, Hans-Henning Kettler, Dr. Oliver Mauss, Jan Oetjen
>> Aufsichtsratsvorsitzender: Michael Scheeren
>>
>> ------------------------------------------------------------------------------
>> 10 Tips for Better Web Security
>> Learn 10 ways to better secure your business today. Topics covered include:
>> Web security, SSL, hacker attacks & Denial of Service (DoS), private keys,
>> security Microsoft Exchange, secure Instant Messaging, and much more.
>> http://www.accelacomm.com/jaw/sfnl/114/51426210/
>> _______________________________________________
>> qooxdoo-devel mailing list
>> [email protected]
>> https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
>>
>>
>

------------------------------------------------------------------------------
Storage Efficiency Calculator
This modeling tool is based on patent-pending intellectual property that
has been used successfully in hundreds of IBM storage optimization engage-
ments, worldwide.  Store less, Store more with what you own, Move data to 
the right place. Try It Now! http://www.accelacomm.com/jaw/sfnl/114/51427378/
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel

Reply via email to