Hi Jim,

I think the problem is not that the value falls back to its default. The 
current behaviour of qooxdoo is that the property should fall back to its 
defaultvalue rather than using the property value of the original appearance. 

I think the main problem here is that the value defined by the user is 
overwritten. Exactly this shortcoming will be eliminated with the next 
qooxdoo release (0.7). This release will support a new property system which 
will preserve the user value (if there is one defined) rather than just 
resetting the value to its default.

Take a look at the news post ( 
http://news.qooxdoo.org/another-exciting-technical-preview ) about the alpha2 
release to get more information about the the new property system.

cheers,
  Alex

On Wednesday 04 April 2007 Jim Hunter wrote:
> Why step #3? This looks like an unnecessary thing to do. Is there a reason
> for it? I would expect that only the items in the new appearance would get
> change, especially if you make the change after some time and the widget
> may be completely changed or moves to a new location or ??? There are lots
> of things that might change in a widget that would get undone with step #3l
> Unless there is some compelling reason why it is done, I would think this
> step should be skipped. And I think this was discussed before...
>
> Jim Hunter
> D4PHP.ORG
>
> On 4/4/07, Alex Back <[EMAIL PROTECTED]> wrote:
> > Hi Ralf,
> >
> > calling setAppearance() resets those properties to its defaultValue which
> > are
> > defined in the original appearance but not in the new appearance.
> > Let me explain this mechanism with your label example.
> >
> > The original "label"-appearance in the Classic appearance-theme defines
> > wrap
> > as "false". Your new "link-ref" appearance does not define the wrap
> > property.
> > The defaultValue for the "wrap"-property is "true".
> >
> > In this case the call of "setAppearance" leads to following behaviour:
> > 1. get the property values from the new appearance (->"link-ref")
> > 2. if an original appearance exists, get also the original values (->
> > "label")
> > 3. reset all properties to their default value which are defined in the
> > original appearance ("label"), but not defined in the new appearance
> > ("link-ref")
> > 4. set the properties defined in the new appearance
> >
> > The third step is important in your case. You did not define any value
> > for "wrap" in your appearance, so the widget gets resetted to its
> > defaultValue.
> >
> > I hope this explanation did answer your question ;-)
> >
> > cheers,
> >   Alex
> >
> > On Wednesday 04 April 2007 Ralf Sternberg wrote:
> > > Hi,
> > >
> > > I noticed that calling setAppearance on a Label resets its wrap
> > > property although the appearance theme contains no definition of this
> > > property. Example code:
> > >
> > >    label.setWrap( false );
> > >    label.debug( "_____ wrap before: " + label.getWrap() );
> > >    label.setAppearance( "link-ref" );
> > >    label.debug( "_____ wrap after: " + label.getWrap() );
> > >
> > > results in
> > >
> > >    DEBUG: qx.ui.basic.Label[1567]: _____ wrap before: false
> > >    DEBUG: qx.ui.basic.Label[1567]: _____ wrap after: true
> > >
> > > The appearance definition looks like this:
> > >
> > >    "link-ref" : {
> > >      initial : function( vTheme ) {
> > >        return {
> > >          cursor : "pointer"
> > >        }
> > >      }
> > >    }
> > >
> > > Does setAppearance() generally resets properties that are not
> > > explicitely defined in the appearance theme?
> > >
> > > Thanks,
> > >    Ralf
> >
> > -------------------------------------------------------------------------
> >
> > > Take Surveys. Earn Cash. Influence the Future of IT
> > > Join SourceForge.net's Techsay panel and you'll get the chance to share
> > > your opinions on IT & business topics through brief surveys-and earn
> >
> > cash
> >
> > http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
> >
> > > _______________________________________________
> > > qooxdoo-devel mailing list
> > > qooxdoo-devel@lists.sourceforge.net
> > > https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
> >
> > --
> > Alexander Back
> > Core Development::Webtechnologies
> > [EMAIL PROTECTED]
> > fon +49 721 91374 8047
> > http://www.1und1.de
> >
> > 1&1 Internet AG
> > Brauerstraße 48
> > 76135 Karlsruhe
> >
> > Amtsgericht Montabaur HRB 6484
> >
> > Vorstand: Henning Ahlert, Hans-Henning Doerr, Ralph Dommermuth, Matthias
> > Ehrlich, Andreas Gauger, Matthias Greve, Robert Hoffmann, Achim Weiss
> > Aufsichtsratsvorsitzender: Michael Scheeren
> >
> > -------------------------------------------------------------------------
> > Take Surveys. Earn Cash. Influence the Future of IT
> > Join SourceForge.net's Techsay panel and you'll get the chance to share
> > your
> > opinions on IT & business topics through brief surveys-and earn cash
> > http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
> > _______________________________________________
> > qooxdoo-devel mailing list
> > qooxdoo-devel@lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel

-- 
Alexander Back
Core Development::Webtechnologies
[EMAIL PROTECTED]
fon +49 721 91374 8047
http://www.1und1.de

1&1 Internet AG
Brauerstraße 48
76135 Karlsruhe

Amtsgericht Montabaur HRB 6484

Vorstand: Henning Ahlert, Hans-Henning Doerr, Ralph Dommermuth, Matthias 
Ehrlich, Andreas Gauger, Matthias Greve, Robert Hoffmann, Achim Weiss
Aufsichtsratsvorsitzender: Michael Scheeren

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
qooxdoo-devel mailing list
qooxdoo-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel

Reply via email to