Thanks for pointing that out. It was a typo error, in my code I do
have myProperty = value2.

If it helps, you can find the code that I'm using to reproduce the
error: http://mvp4g.googlecode.com/svn/temp/gwt-example.zip and the
soyc report: http://mvp4g.googlecode.com/svn/temp/compile-report.zip

When you look at the report, you do see the expected deferred property
set:
Permutation 0 ('myProperty' : 'value1' , 'user.agent' : 'gecko1_8')

but clicking on the Slip Point Report, you see the 2 implementations
generated are here whereas only one is expected.

Pierre

On Sep 27, 8:00 am, Paul Robinson <ukcue...@gmail.com> wrote:
> I don't know the answer to your question, but there is a mistake in the 
> gwt.xml fragment you posted. You assign myProperty=value1 when user.agent 
> equals FF and also when user.agent is not FF. You never assign myProperty = 
> value2.
>
> HTH
> Paul
>
> On 27/09/11 05:37, Pierre Coirier wrote:
>
>
>
>
>
>
>
> > Hi,
>
> > I got an issue with deferred property and code splitting.
>
> > In my GWT configuration file, I have defined the following property:
> > <define-property name="myProperty" values="value1,value2" />
> > <set-property name="myProperty" value="value1">
> >    <when-property-is name="user.agent" value="gecko1_8" />
> > </set-property>
> > <set-property name="myProperty" value="value1">
> >    <none>
> >      <when-property-is name="user.agent" value="gecko1_8" />
> >    </none>
> > </set-property>
>
> > and I have a generator with the following code that generates one
> > implementation depending on this deferred property value:
>
> > public String generate( TreeLogger logger, GeneratorContext context,
> > String typeName ) throws UnableToCompleteException {
> >      String value = propertyOracle.getSelectionProperty( logger,
> > "myProperty" );
> >      if("value1".equals(value)){
> >          return generateImpl1();
> >      } else {
> >          return generateImpl2();
> >      }
> > }
>
> > According to my settings for each browser, you can have only one
> > value, ie for each permutation my generator should generate either
> > Impl1 or Impl2 but not both. However in my soyc report, I noticed that
> > for each browser/permutation, both implementations are generated.
>
> > The issue I have is that my generator generates the same GWT.runAsync
> > call for both implementation and since the 2 implementations are
> > generated for each permutation (even if only one can be used for each
> > permutation), GWT believes there are 2 split points and since it's the
> > same code inside the 2 split points, all the code is added to the left
> > fragment code.
>
> > My question is how come my generator is called twice for each
> > permutation? Since only one value is possible for each permutation
> > shouldn't it be called only once? Am I doing something wrong in my
> > configuration which could explain why my generator is called twice?
>
> > Thanks for your help,
> > Pierre

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.

Reply via email to