chinshaw / google-gin

Automatically exported from code.google.com/p/google-gin
Apache License 2.0
1 stars 0 forks source link

Allow Gin bindings to depend on GWT properties #150

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
Issue 129 now makes it easy to specify a Gin module in a GWT module .xml file. 
However, it is still impossible to make a binding depend on a GWT property 
(such as, say, `user.agent`). As a result, the only way to instantiate 
browser-dependant classes is to leave it unbound and rely on Gin using 
GWT.create() to create them. The drawback is that any injected field is left 
uninitialized.

I'm not sure of the best way to enable that feature. Things we could consider, 
from simple (but less interesting) to more involved:
  * Injecting @inject fields in classes instantiated with GWT.create and asking the user the rely on <replace-with>.
  * Conditionally switching Gin modules based on GWT properties
  * Having some kind of conditionalBind() mechanism.

Original issue reported on code.google.com by philippe.beaudoin on 24 Apr 2011 at 4:21

GoogleCodeExporter commented 8 years ago

Original comment by aragos on 24 Apr 2011 at 11:07