Re: Loading/parsing time for CssResource

2010-01-09 Thread Sebastian Beigel
Please ignore this post, it's a double post as I didn't realize that
new mails are moderated. I wrote a newer (and more concise :) post
discussing this subject (search for Injected CSS rules are evaluated
after onModuleLoad/Widget#onLoad)

My apologies,
Sebastian
-- 
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To post to this group, send email to google-web-tool...@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.




Loading/parsing time for CssResource

2010-01-08 Thread Sebastian
Hi,

I'm playing around with GWT 2.0 and I really like it! But I've
encountered a problem with ClientBundles/CssResources. After moving my
static CSS files from the HTML-file (style-tags) to a ClientBundle in
my EntryPoint, I have timing problems. I position some elements
relative to others in an Widget#onLoad() method and the positioning is
wrong. I think the (in a static initializer) injected CSS rules are
not loaded/parsed/evaluated completely at the time my positioning code
runs.

For a test, I deferred my positioning (by triggering it via a button-
click in the UI) and everything works as expected.

Moving the CSS back to the HTML-page works as well, but is neither my
nor *the* preferred solution :)

I think it's quite important to have the CSS rules included in a
ClientBundle fully evaluated before firing any on-load events or
calling these methods.

Or is there another way to do this? Something like a ClientBundle/
CssResource onLoad-method could be a (rather dirty) work-around...

Thank you,
Sebastian
-- 
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To post to this group, send email to google-web-tool...@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.