Friday, September 6, 2013

Re: Help on defered binding with Internet Explorer



On Friday, September 6, 2013 12:54:30 PM UTC+2, Thomas Lefort wrote:
Thanks! makes a lot of sense. Will try the <not> suggestion.

Regarding the widget replacement, I assumed it was possible to proceed as I mentioned by looking at the Popup rule provided @ http://www.gwtproject.org/doc/latest/DevGuideCodingBasicsDeferred.html
It is true that PopupImpl is not being directly extended indeed. I will have to change my implementation.

PopupImpl is extended, but GWT.create() is called with PopupImpl.class as argument (which will match the <when-type-is> rules), and depending on the user.agent value, GWT.create() will return a new PopupImplMozilla, PopupImplIE6 or PopupImpl instance, just as if you had written "new PopupImpl()", "new PopupImplMozilla()" or "new PopupImplIE6()" –or "propertyIs("user.agent", "ie6") ? new PopupImplIE6() : propertyIs("user.agent", "gecko1_8") ? new PopupImplMozilla() : new PopupImpl()"–, except the binding to the actual class is deferred to quasi-runtime – compile-time, but the choice of permutation is done at runtime, so permutations are kind of like a grouping/factoring of all runtime choices – and more importantly, outside your code so it can be re-configured without touching the code).

BTW, the doc needs updating to remove the "gecko" permutation, so thanks for link ;-)

--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscribe@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/groups/opt_out.

No comments:

Post a Comment