Saturday, August 16, 2014

Re: Can I use to replace a Google class?

I see you have found a good fix but in future, if you are feeling evil, you can just put your source first in the GWTC class path. We have done this to get a UTC only version of java.util.Date

On Friday, August 15, 2014 3:15:58 PM UTC+1, chris-x...@db.com wrote:
Hi,

I am having problems running in hosted mode (GWT 2.6.1) as a result of a possible bug in com.google.gwt.dom.client.StyleInjector.java (see Issue 8863).

The fix is simple, so I have created my own version of the problem class in my Eclipse project, and specified a <replace-with /> in the module file:

    <replace-with class="com.db.patch.StyleInjectorImplIE">
        <when-type-is class="com.google.gwt.dom.client.StyleInjector.StyleInjectorImplIE"/>
    </replace-with>

It doesn't seem to work.  Using the debugger, I still see the code in the original class being executed, and the resulting ArrayIndexOutOfBoundsException is thrown.  Is there a reason why I can't replace this class?  If so, can anyone suggest a way to get my patch into the project, preferably without replacing or modifying gwt-user-2.6.1.jar?

It looks like the original StyleInjector.StyleInjectorImplIE may be replacing StyleInjector.StyleInjectorImplIE.  Does <replace-with /> recurse through multiple levels of replacement?  Is there a way to see what browser-specific replacements happen by default?

Thanks,

Chris

--
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/d/optout.

No comments:

Post a Comment