Feature request: dependent permutations

1 view
Skip to first unread message

Shaun

unread,
Oct 30, 2009, 12:48:42 PM10/30/09
to Google Web Toolkit
Hi,

I'm looking for a way to support additional sub-environments with
GWT. By sub-environment, I mean an environment that is similar to an
existing environment, but requires specific tweaks of it's own that
don't merit a full user.agent right now.

Two examples that are causing me pain at the moment:

(1) Widget environments like Vista sidebar, Google Desktop, Mac
Dashboard. While these use the installed browser as their base, they
all have their own quirks to take account of.

(2) Mobile phone environments, where we end up pegging them all to
"safari" when in fact they each have their own capabilities.

It seems like dynamic binding would be a good solution here but.
Unfortunately, I hit problems right now if I try to use dynamic
binding because I have two choices, neither of which is great:

(1) extend the user.agent property with a new value "ie6gd" say --
this seems like the right thing to do but it means that I have to
repeat all of the declarations from all of the ie6-specific modules I
inherit and hence it's impractical/difficult to maintain.

(2) add an extra permutation axis -- this is an option but it means
I'll get a lot of permutations I don't need like safari-vista-sidbar,
killing my compile time.

I'd like to be able to tell GWT to "extend the user.agent property
with new user agent ie6.gd but base it on the existing ie6 value". An
alternative based on (2) would be giving a method to say "only these
permutations make sense" in the manifest file, to avoid compiling
unneeded code.

What do you think?

-Shaun

Thomas Broyer

unread,
Oct 30, 2009, 3:36:10 PM10/30/09
to Google Web Toolkit
GWT 2.0 already has this second option:
http://code.google.com/p/google-web-toolkit/wiki/ConditionalProperties
(see Example 2)

Shaun

unread,
Oct 31, 2009, 12:00:11 PM10/31/09
to Google Web Toolkit
Great, I can't wait for GWT 2.0.
Reply all
Reply to author
Forward
0 new messages