Deriving you Page class would be a lot nicer. To use these internal APIs or
maps is not good style and may more easily break when the implementation is
modified.
Sebastian
2009/4/29 Matthew Gregory
<[email protected]<matthew%[email protected]>
>
> Thanks for the reply.
> I can work around the problem quite easily, we have a very large custom
> theme that uses our own appearances, decorations and, yes custom states.
>
> I am happy to withdraw the bug if you that this "improvement" is not
> needed and users should stick to custom appearances on the parent and
> forward states.
>
> BTW: I am not overriding tabview.Page, so for states to work correctly I
> am going to have to manipulate _forwardStates outside of the class
>
> var page = new qx.ui.tabview.Page();
> page.setAppearance("custom page");
> page._forwardStates["custom"] = true;
>
>
> Sebastian Werner wrote:
> > There are a few aspects which are important to keep in mind:
> >
> > * Using child control mechanisms always deactivates the manually applied
> > appeanrace of the widget and uses the child control ID instead. This is
> > by design as it simplifies a lot of cases where you don't have to find
> > matching appearance names yourself. Instead the "selector" used is
> > somewhat magically created by the system itself.
> > * Normally widgets containing child controls are styled at once e.g. a
> > Spinner, so the best you can do here, if you just want to override the
> > style of the up-button is to access the button of the spinner through
> > the child control ID e.g. "spinner/upbutton".
> > * Accessing private members like the properties user field is not good
> > as these internals things might change. Also there a values which have
> > even a higher priority than the user field or the value may be defined
> > in the theme or some other "field". The getter should always been used.
> > But the getter always return a value - even if no user value is
> > configured (falls back to the init value for example). Every widget in
> > qooxdoo comes at least with a default appearance normally configured by
> > its init value.
> >
> > The only issues which remains, if it is really an issue is, that you
> > cannot easily override a single instance which is managed by a child
> > control. This is rarely used so it might not be a problem for most
> > users. You can work-around this limitation adding states to the instance
> > which needs a customized look. This even allowes you to use the same
> > properties as needed from the default look e.g. just replace the
> > background while keeping the font for example. A lot easier than copy
> > over the default style and create a completely customized entry.
> >
> > Hope this explains it a bit more. Until today I have never heard that
> > somebody has really a need for such a thing. But that does not mean a
> > lot. Do you already know about the state features? You may find some
> > more information regarding this topic in our wiki at:
> > http://qooxdoo.org/documentation/0.8/ui_appearance
> >
> > Cheers,
> > Sebastian
> >
> >
> > 2009/4/29 Matthew Gregory
> > <[email protected]<matthew%[email protected]>
> > <mailto:matthew%[email protected] <matthew%[email protected]>
> >>
> >
> > Thanks Sebastian,
> >
> > Regarding your comment on the bug, could you please explain the
> reason
> > behind this? I understand the benefit of it working that way
> > automatically, but not in preventing you from overriding it. The
> patch I
> > uploaded uses the existing behaviour by default, but allows you to
> > override the appearance if you want to.
> >
> > It doesn't make sence to me to not allow this. You can manually
> override
> > other properties including the decorator.
> >
> > Thanks,
> > Matt
> >
> >
> > For the sake of the group this is the comment from the bug report:
> > ------- Comment #2 From Sebastian Werner 2009-04-29 12:27:11
> [reply]
> > -------
> >
> > Child controls are always styled according to the first parent which
> is
> > not a child control of any other widget. Overriding a appearance of a
> > child control is not possible - by design.
> >
> > But you can easily overwrite such a appearance entry by accessing
> > the parent
> > e.g.
> >
> > "button/label" : {
> > style : function()
> > {
> > return { textColor: "black" };
> > }
> > }
> >
> > If you have further question regarding this topic feel free to post
> > to our
> > mailing list.
> >
> >
> >
> > Sebastian Werner wrote:
> > > Mhh, maybe a state would help to customize a single instance in
> > this case?!?
> > >
> > > Sebastian
> > >
> > >
> > > 2009/4/29 Sebastian Werner <[email protected]
> > <mailto:[email protected]> <mailto:[email protected]
> > <mailto:[email protected]>>>
> > >
> > > I would say it is a feature :)
> > >
> > > Cheers,
> > > Sebastian
> > >
> > >
> > >
> > >
> > > 2009/4/29 Matthew Gregory
> > <[email protected]<matthew%[email protected]>
> > <mailto:matthew%[email protected]<matthew%[email protected]>
> >
> > >
> > <mailto:matthew%[email protected]<matthew%[email protected]>
> >
> > <mailto:matthew%[email protected]<matthew%[email protected]>
> >>>
> > >
> > > Had a eurika moment :)
> > >
> > > Reported as Bug#2324 with a proposed patch
> > >
> > > Matthew Gregory wrote:
> > > > Hi All,
> > > > I seem to be having a problem with setAppearance. I
> have a
> > > standard
> > > > TabView with a button (tab) that I need to change the
> > > appearance of but
> > > > it doesn't work.
> > > >
> > > > page.getChildControl("button").setAppearance("button");
> > > >
> > > > This seems to be true for all child controls. I looked
> at
> > > syncAppearance
> > > > in Widget.js and it seems that the selector is
> > correctly set.
> > > >
> > > > Is this a bug or a "feature"?
> > > >
> > > > TIA,
> > > > Matt
> > > >
> > > >
> > > >
> > >
> >
> ------------------------------------------------------------------------------
> > > > Register Now & Save for Velocity, the Web Performance &
> > > Operations
> > > > Conference from O'Reilly Media. Velocity features a
> > full day of
> > > > expert-led, hands-on workshops and two days of
> > sessions from
> > > industry
> > > > leaders in dedicated Performance & Operations tracks.
> Use
> > > code vel09scf
> > > > and Save an extra 15% before 5/3.
> > > http://p.sf.net/sfu/velocityconf
> > >
> > >
> > >
> >
> ------------------------------------------------------------------------------
> > > Register Now & Save for Velocity, the Web Performance &
> > Operations
> > > Conference from O'Reilly Media. Velocity features a full
> > day of
> > > expert-led, hands-on workshops and two days of sessions
> from
> > > industry
> > > leaders in dedicated Performance & Operations tracks. Use
> > code
> > > vel09scf
> > > and Save an extra 15% before 5/3.
> > http://p.sf.net/sfu/velocityconf
> > > _______________________________________________
> > > qooxdoo-devel mailing list
> > > [email protected]
> > <mailto:[email protected]>
> > > <mailto:[email protected]
> > <mailto:[email protected]>>
> > >
> https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
> > >
> > >
> > >
> > >
> > >
> >
> ------------------------------------------------------------------------
> > >
> > >
> >
> ------------------------------------------------------------------------------
> > > Register Now & Save for Velocity, the Web Performance & Operations
> > > Conference from O'Reilly Media. Velocity features a full day of
> > > expert-led, hands-on workshops and two days of sessions from
> industry
> > > leaders in dedicated Performance & Operations tracks. Use code
> > vel09scf
> > > and Save an extra 15% before 5/3.
> http://p.sf.net/sfu/velocityconf
> > >
> > >
> > >
> >
> ------------------------------------------------------------------------
> > >
> > > _______________________________________________
> > > qooxdoo-devel mailing list
> > > [email protected]
> > <mailto:[email protected]>
> > > https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
> >
> >
> >
> ------------------------------------------------------------------------------
> > Register Now & Save for Velocity, the Web Performance & Operations
> > Conference from O'Reilly Media. Velocity features a full day of
> > expert-led, hands-on workshops and two days of sessions from industry
> > leaders in dedicated Performance & Operations tracks. Use code
> vel09scf
> > and Save an extra 15% before 5/3. http://p.sf.net/sfu/velocityconf
> > _______________________________________________
> > qooxdoo-devel mailing list
> > [email protected]
> > <mailto:[email protected]>
> > https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
> >
> >
> >
> > ------------------------------------------------------------------------
> >
> >
> ------------------------------------------------------------------------------
> > Register Now & Save for Velocity, the Web Performance & Operations
> > Conference from O'Reilly Media. Velocity features a full day of
> > expert-led, hands-on workshops and two days of sessions from industry
> > leaders in dedicated Performance & Operations tracks. Use code vel09scf
> > and Save an extra 15% before 5/3. http://p.sf.net/sfu/velocityconf
> >
> >
> > ------------------------------------------------------------------------
> >
> > _______________________________________________
> > qooxdoo-devel mailing list
> > [email protected]
> > https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
>
>
>
> ------------------------------------------------------------------------------
> Register Now & Save for Velocity, the Web Performance & Operations
> Conference from O'Reilly Media. Velocity features a full day of
> expert-led, hands-on workshops and two days of sessions from industry
> leaders in dedicated Performance & Operations tracks. Use code vel09scf
> and Save an extra 15% before 5/3. http://p.sf.net/sfu/velocityconf
> _______________________________________________
> qooxdoo-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
>
------------------------------------------------------------------------------
Register Now & Save for Velocity, the Web Performance & Operations
Conference from O'Reilly Media. Velocity features a full day of
expert-led, hands-on workshops and two days of sessions from industry
leaders in dedicated Performance & Operations tracks. Use code vel09scf
and Save an extra 15% before 5/3. http://p.sf.net/sfu/velocityconf
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel