Monday, August 30, 2010

Re: Advice for GWT.create and tag ?

On 30 août, 11:54, Ice13ill <andrei.fifi...@gmail.com> wrote:
> I'm developing an app for 2 languages and GWT performs 12 compilation
> (2*6 for each browser)
> But i also need to develop a second UI for some widgets so i decided
> to use the <replace-with> tag for replacing a class with one of it's
> children and also instantiating that class with GWT.create().
> the problem is that now GWT performs 24 compilation (and it seems very
> awkward because the gwt library uses a lot of these replace-with/
> create() stuff). So if i use a second replace-with tag and
> GWT.create() for another class replacement, will that generate another
> 12 compilations ? (36 total !)

The number of permutation is dependent upon the number of deferred-
binding properties and their possible values, not the number of
<replace-with> or <generate-with> rules.

> The question is: am i doing smth wrong ? or should i adopt another
> strategy for using multiple classes ?
> Please advice !

I don't understand what you mean by "a second UI for some widgets" so
I can't tell how you should do it (and whether <replace-with> and more
generally deferred-binding is appropriate for your case).
What's clear is that you seem to have added a new deferred-binding
property (<define-property>) with two possible values (to be
determined at runtime by a property-provider or explicitly using a
<meta name=gwt:property>), and you should question yourself whether
this is needed.

--
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-toolkit@googlegroups.com.
To unsubscribe from this group, send email to google-web-toolkit+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.

No comments:

Post a Comment