Thank you Joseph for your comment. Just a little bit more info, I've also tried with GWT 2.8.0-SNAPSHOT without success from:
<repository> <id>google-snapshots</id> <url>https://oss.sonatype.org/content/repositories/google-snapshots/</url> <releases> <enabled>false</enabled> </releases> <snapshots> <enabled>true</enabled> </snapshots> </repository> What I find very odd is both the Nextgen GWT/JS Interop (Public) <https://docs.google.com/document/d/1tir74SB-ZWrs-gQ8w-lOEV3oMY6u6lF2MmNivDEihZ4/edit#> and the talk refer to the Js.js method and @JsExport in such a clear way.. On Saturday, February 14, 2015 at 4:52:35 AM UTC, Joseph Gardi wrote: > > I was disappointed that there was no Js.js. I think there is no Js.js > because according to the release notes they just started implementing > experimental js annotations. It didn't say anything about Js.js. Js.js will > probably be in 2.8. I think 2.8 will come out within the next couple of > months although you can never be sure with an open source project. I don't > know how to fix you're exporting problem but I wasn't able to get it > working either. The release notes did say that there'd be bugs and this > might be one of them. > > On Friday, February 13, 2015 at 8:47:20 PM UTC-5, Vasco Andrade Silva > wrote: >> >> Hi all, >> >> I'm just starting with JsInterop but I can't figure out why some of the >> things aren't working. >> >> First thing first: I'm using GWT 2.7 and I've setup maven/pom >> with "-XjsInteropMode" via "<jsInteropMode>JS</jsInteropMode>" >> configuration: >> >> <!-- GWT Maven Plugin --> >> <plugin> >> <groupId>org.codehaus.mojo</groupId> >> <artifactId>gwt-maven-plugin</artifactId> >> <version>${gwtVersion}</version> >> […] >> <configuration> >> […] >> <jsInteropMode>JS</jsInteropMode> >> </configuration> >> </plugin> >> >> I tested that the flag was being correctly set by passing wrong values >> and see that the compiler didn't run. I also followed >> https://github.com/gwt-maven-plugin/gwt-maven-plugin/issues/89 >> >> I have the following dependencies declared in my pom: >> <dependency> >> <groupId>com.google.gwt</groupId> >> <artifactId>gwt-user</artifactId> >> <version>${gwtVersion}</version> >> <scope>provided</scope> >> </dependency> >> <dependency> >> <groupId>com.google.gwt</groupId> >> <artifactId>gwt-dev</artifactId> >> <version>${gwtVersion}</version> >> <scope>provided</scope> >> </dependency> >> >> >> So my problems are the following: >> >> *Issue #1: Can't find the JS.js method anywhere* >> In the "Deep dive JS Interop" from Ray Cromwell at GWT.create 2015 ( >> slides >> <https://docs.google.com/a/byclosure.com/file/d/0ByS1wxINeBWjeGYxbkJpamxFZ28/edit>) >> >> there are several slides that refer to a (static) "js" method. Nextgen >> GWT/JS Interop (Public) >> <https://docs.google.com/document/d/1tir74SB-ZWrs-gQ8w-lOEV3oMY6u6lF2MmNivDEihZ4/edit#> >> also >> refers this method. However I can't find this method... Where is it? How >> can I make my application use it? >> >> I manage to make use of @JsType/@JsProperty via a JSNI method and an >> Overlay Type, but I what I really wanted is not having to write any JSNI at >> all. >> >> @JsType >> public interface UserJs { >> @JsProperty String getName(); >> @JsProperty String getEmail(); >> } >> >> public static native UserJs getUser() /*-{ >> return $wnd.User; >> }-*/; >> >> >> *Issue #2: Can't make @JsExport work* >> I tried several combinations of @JsExport based on the previous slides >> and Nextgen GWT/JS Interop (Public) >> <https://docs.google.com/document/d/1tir74SB-ZWrs-gQ8w-lOEV3oMY6u6lF2MmNivDEihZ4/edit#> >> but >> couldn't manage to have any symbol exported to the global JS namespace. >> E.g. I couldn't make the following example from Ray's "Deep dive JS >> Interop" talk work: >> >> @JsNamespace("mylib") >> class Foo { >> @JsExport >> public static final int CONSTANT = 42; >> } >> >> >> mylib, Foo, or CONSTANT symbols aren't available in the JS runtime. What >> am I doing wrong? >> >> >> Thank you in advance, >> Vasco >> >> -- 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 [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/google-web-toolkit. For more options, visit https://groups.google.com/d/optout.
