One more thing: once I have this code working, how do I apply one of the
appearances or themes to a given object? I use these to color text (Atoms)
on the page. I have no control over the names or the information in the
Apperance, it comes from a database. These used to be CSS classes but I
changed to Apperances because qooxdoo doesn't line CSS. So given that I have
a set of params detailing font color and style, what is the best way to get
my objects to be this color? I am provided the font information first then I
am provided the info for what controls to create on the page, and I am
passed in the CSS classname (that I turn into Appearances) for each control.
A guess I am in serious need of education on theme and Appearance support. I
have read the Wiki, it just doesn't seem to fill in all the gaps.
Thanks,
Jim
www.D4PHP.org
www.D4PHP-Hosting.com
On 7/30/07, Fabian Jakobs <[EMAIL PROTECTED]> wrote:
>
> Hi Jim,
> > I just migrated to 0.7.2-pre (r9171) and my appearances are generating
> > errors when I try and run the app. I looked in the API viewer to see
> > what the new structure is and it says:
> Are you using trunk or the legacy_0_7 branch? I would strongly suggest
> to use legacy_0_7. This is where all 0.7 related bugs are fixed. Since
> we are now starting to work on the layout managers, the trunk is
> expected to be fairly instable for the next time.
>
> > qx.theme.manager.Appearance.getAppearanceTheme ()
> >
> > is the way to get the instance of the current theme but I get an error
> > 'is not a function" error. So what is the new way to register a theme?
> > I don't see any docs on it and the migration script couldn't help me
> > as this is code that is generated from the server (I just created a
> > test file and migrated it and got the same resulting line). Here is a
> > sample of what I am generating:
> >
> > theme = qx.theme.manager.Appearance.getAppearanceTheme();
> > theme.registerAppearance("SFREGULARTEXT",{ setup: function(){
> > this.font = new qx.renderer.font.Font(12,"Arial");}, initial:
> > function(){ return { font: this.font, color: "Black"}; }});
> > theme.registerAppearance("SFHIGHLIGHTEDTEXT",{ setup: function(){
> > this.font = new qx.renderer.font.Font(12,"Arial");}, initial:
> > function(){ return { font: this.font, color: "Black"}; }});
> > theme.registerAppearance("SFHOTTEXT",{ setup: function(){ this.font =
> > new qx.renderer.font.Font(12,"Arial");}, initial: function(){ return {
> > font: this.font, color: "Black"}; }});
>
> The whole way we handle appearances has changed a lot. The function
> "registerAppearance" no longer exist. If you want to extend an already
> existing theme you can define the apperances in a separate appearance
> theme and use the mixin mechanism to apply the changes/enhancements to
> an existing appearance theme.
>
> Example for your code:
>
> custom/Appearance.js:
>
> qx.Theme.define("custom.Appearance",
> {
> name : "foo",
>
> appearances :
> {
> "SFREGULARTEXT" : {
> style : function(states) {
> return {
> font : new qx.ui.core.Font(12, ["Arial"]);
> textColor : "black"
> }
> }
> },
>
> "SFHIGHLIGHTEDTEXT" : {
> style : function(states) {
> return {
> font : new qx.ui.core.Font(12, ["Arial"]);
> textColor : "black"
> }
> }
> },
>
> ...
>
> }
> }
>
> And in your application you include it:
>
> qx.Theme.include(qx.theme.classic.Appearance, custom.Appearance);
>
> > And also, 'MS Sans Serif' is no longer a valid font name whereas it
> > has been for years. What do I use in place of 'MS Sans Serif'?
> The font name should be valid but the second parameter of the font
> constructor is now a string array. Take a look at the example above.
> Another note: the property color has been renamed to test color to be
> more specific and better match to the backgroundColor property.
>
> I hope this helps,
> Best Fabian
>
> --
> Fabian Jakobs
> JavaScript Framework Developer
>
> 1&1 Internet AG
> Brauerstraße 48
> 76135 Karlsruhe
>
> Amtsgericht Montabaur HRB 6484
>
> Vorstand: Henning Ahlert, Ralph Dommermuth, Matthias Ehrlich, Andreas
> Gauger, Matthias Greve, Robert Hoffmann, Norbert Lang, Achim Weiss
> Aufsichtsratsvorsitzender: Michael Scheeren
>
>
> -------------------------------------------------------------------------
> This SF.net email is sponsored by: Splunk Inc.
> Still grepping through log files to find problems? Stop.
> Now Search log events and configuration files using AJAX and a browser.
> Download your FREE copy of Splunk now >> http://get.splunk.com/
> _______________________________________________
> qooxdoo-devel mailing list
> qooxdoo-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
>
-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
qooxdoo-devel mailing list
qooxdoo-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel