Sunday, March 1, 2015

Module property and deferred binding not evaluated correctly after recompile in super dev mode (SDM)

I am using super dev mode (SDM) with GWT 2.7.0.

I use the following module code to create a new property (user.agent.ie8) based on the user.agent property:
>>
    <!-- !!! define a pure ie8 variable (no fallback from ie9) -->

    <define-property name="user.agent.ie8" values="true,false"/>

    <set-property name="user.agent.ie8" value="false"/>

    <set-property name="user.agent.ie8" value="true">
        <any>
            <when-property-is name="user.agent" value="ie8" />
        </any>
    </set-property>
<<

Testing this from IE8:

When I clean and compile the entire module the following deferred binding (based on the new property) works:
>>
    <replace-with class="com.example.SelectionFactoryImplIElt9">
        <when-type-is class="com.example.SelectionFactory"/>
        <any>
            <when-property-is name="user.agent" value="ie6" />
            <when-property-is name="user.agent.ie8" value="true" />
        </any>
    </replace-with>
<<

However, when I then start SDM and recompile. The above deferred binding fails (SelectionFactory is not replaced with the IE8 version). 

In both situations I made sure that user.agent is indeed ie8. Also the SDM log states "binding: user.agent=ie8".

I would be thankful for your input. 
Best regards, Robert


--
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