On Wednesday, November 27, 2013 11:13:03 AM UTC+1, Jens wrote:
>
>
>> There's "gwt:onPropertyErrorFn" and "gwt:onLoadErrorFn" hooks (set the 
>> name of a JS func in a <meta> with that name; e.g. <meta 
>> name="gwt:onPropertyErrorFn" value="gwtErrFns.prop">, and var gwtErrFns = { 
>> prop: function(propName, allowedValuesList, value) { 
>> window.location.replace("static/error.html"); } })
>>
>
> I know. But they are not reliable. If you disable IE6 and IE8 permutation 
> the bootstrap file still assigns a valid ie6, ie8 value to the user.agent 
> property because the user.agent detection code does still contain the 
> ie6/ie8 checks. onPropertyErrorFn will only be called if the user.agent 
> value contains an invalid value. So to make it work way better the 
> detection code should be aware of the enabled/disabled permutations and 
> only do the required checks instead of all checks. That way the 
> onPropertyErrorFn function would become useful for this scenario.
>

If that's the case, then it means a PropertyProviderGenerator is called 
with the full list of possible values even when that list is restricted to 
a subset of them with <set-property>. I'd say it's a bug.
That said, it wouldn't be enough in some cases: imagine using a conditional 
set-property where ie9,gecko1_8 are enabled for locale=en and ie9,safari 
are enabled for locale=fr, the property provider would have to return 
either gecko1_8 or safari, and then depending on the locale a permutation 
would be found or not; which would be the same behavior as we have today if 
you disable a user.agent globally. In this case, onLoadErrorFn would be 
called IIRC. Are you saying onLoadErrorFn is not reliable?
(in all honesty, I never used them, I only ever read the code that calls 
them, and I haven't checked the exact behavior)

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

Reply via email to