Hi,

I started a thread a while back asking for some way to support sub-
types of properties (e.g. for mobile Safari/Android).  I got a quick
response saying that Conditional Properties were the answer, and that
they were in GWT 2.0.

Thread:
http://groups.google.com/group/google-web-toolkit/browse_thread/thread/41cf2491d3a33148/b027eae0b6dd6f9d?lnk=gst&q=Shaun#b027eae0b6dd6f9d

Conditional Properties: 
http://code.google.com/p/google-web-toolkit/wiki/ConditionalProperties

Now GWT 2.0 is out, I'm trying to get conditional properties to work
but not having much luck.  I added the following to my gwt.xml file.
It happily compiles but says it's only compiling the usual 6
permutations rather than the expected 8.  In fact, even if I remove
the set-property declaration, I still only get 6 permutations so maybe
I'm doing something wrong here.

  <define-property name="mobile.user.agent"
values="android,iphone,none" />
  <property-provider name="mobile.user.agent"><![CDATA[
  {
    var ua = window.navigator.userAgent.toLowerCase();
    if (ua.indexOf('android') != -1) { return 'android'; }
    if (ua.indexOf('iphone') != -1) { return 'iphone'; }
    return 'none';
  }
  ]]></property-provider>

  <!-- Constrain the value for non-webkit browsers -->
  <set-property name="mobile.user.agent" value="none" >
    <none>
      <when-property-is name="user.agent" value="safari" />
    </none>
  </set-property>

Has anyone managed to get this to work?  Does anyone know if
conditional properties were indeed implemented or whether they were
shelved for some reason?

Thanks,

-Shaun

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

Reply via email to