On Nov 27, 3:21 am, "[email protected]" <[email protected]> wrote:
> A question about deferred binding... If I define a new property in the
> gwt.xml module file; say,
>
> <define-property name="timeoftheday"
> values="morning,noon,evening,night">
>
> and an appropriate generator
>
> <property-provider name="timeoftheday">
>
> that will get the time of the day, and generate the property value
> accordingly.
>
> Of course, I would have some deferred binding rules that would replace
> some classes with other classes, depending on the timeoftheday
> property.
>
> (Please, bear with me, and assume there is some valid reason for using
> different classes at different parts of the day!)
>
> Am I totally mistaken, or would then the compiler generate FOUR
> (because of the four values of the property) times as many versions of
> the JavaScript code?
>
> That is, if you supported 5 languages for i18n purposes, GWT would
> produce 5 times 6 versions of the code (5 languages times 6 supported
> browser types) -- with my timeoftheday variable, would that become 5
> times 6 times 4 versions?
You're not mistaken; but if you have a need for it, it shouldn't stop
you from doing it; well, unless the differences between permutations
are very minimal and wouldn't suffer from being "merged" into a single
one (instead of deferred binding, you'd route to the appropriate class
within your application code: if (5 <= time && time < 12) { impl = new
MorningImpl() } else if... )
--
You received this message because you are subscribed to the Google Groups
"Google Web Toolkit" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/google-web-toolkit?hl=en.