On 10/18/2010 01:40 AM, Kenneth Tilton wrote:
> Ugh. I am trying to use DarkTheme in my oddball app that sends almost 
> all JS over to the client for eval-ing, with Application.js just kicking 
> off the first load.

What does that mean? Normal qooxdoo app loading, or do you use parts, or
what?

> 
> I have it working to use qx.theme.Modern by first including a simple 
> reference to the class

To which class, qx.theme.Modern?!

> in Application.js, which I have end with an XHR 
> on a URL "/begin"

Is this significant for the problem?

> that gets back a ton of JS defining the interface, 

So you've written your own loader?! - Brave you :).

> including:
> 
>      qx.theme.manager.Meta.getInstance().setTheme(qx.theme.Modern);
> 
> I added the bits to my config.json as specified here:
> 
>     http://qooxdoo.org/contrib/project/darktheme
> 
> ...and it seems to work because I see it fussing over DarkTheme and I 
> did find the whole theme in a temp download directory.

That's just evaluating the "library" key of your config.

> 
> In application.js I simply mention darktheme.DarkTheme, and I pass the 
> same to setTheme. I suspect, btw, this is where I am messing up.

The interesting question is, is the Modern theme still drawn in as well?

> 
> I then do a "generate.py build"* and when I call up the site I get a JS 
> error saying "qx.Class is not defined", which sounds odd (as if all of 
> qx is missong)

As you are using your custom loader, getting in "tons of JS", there's
not much I can say about that.

> but I think I get the same whenever I start sending over 
> JS that references a new widget but forget to add a mention to 
> Application.js.

Do you want to list all classes you use in your Application.js <rofl>?!
That's a funny way to code.

> 
> As a sanity check I can switch everything back to Modern and all goes well.
> 
> So I am guessing it is just the name. Should that be 
> qx.darktheme.DarkTheme? qx.theme.darktheme.DarkTheme? Some other 
> permutation?

No, you wouldn't want to do that, for the same reason you wouldn't start
to refer to qx.ui.window.Window by the name of
darktheme.DarkTheme.Window. Class names are unique identifiers within
qooxdoo, and you don't start calling them by arbitrary names, ok.

The important thing when using libraries in qooxdoo (and a contrib
providing a themen is nothing else) is two-fold:

- make the library code accessible; I guess that's a check for you, as
the contrib gets downloaded and "fussed over" ;)

- make use of classes from the library, i.e. create dependencies to it;
you did that by probably adding a bare "darktheme.Darktheme;" line to
your Application.js, right?! A more standard way to achieve this is to
edit the "include" entry of the build job in the config, or - even
easier when using themes - change the QXTHEME macro in config.json. What
is the value of that in your case?

T.


------------------------------------------------------------------------------
Download new Adobe(R) Flash(R) Builder(TM) 4
The new Adobe(R) Flex(R) 4 and Flash(R) Builder(TM) 4 (formerly 
Flex(R) Builder(TM)) enable the development of rich applications that run
across multiple browsers and platforms. Download your free trials today!
http://p.sf.net/sfu/adobe-dev2dev
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel

Reply via email to