Yep! Thanks for your help! :)
What does the trick is the flag -XjsInteropMode JS .
If anyone want to use my GWT JS interop demo is on https://github.com/ederign/gwt-playground.
2014-07-15 0:47 GMT-03:00 田传武 <i@goodow.com>:
gwt-js1 disappeared and you seem to have succeeded according to your commit log.
On Tuesday, July 15, 2014 2:01:45 AM UTC+8, Eder Ignatowicz wrote:I'm using the xsiframe linker.ignat...@gmail.com
I just pushed my POC here:
https://github.com/ederign/gwt-playground/blob/master/gwt-js1/src/main/resources/me/ederign/jsinterop.gwt.xml
https://github.com/ederign/gwt-playground/blob/master/gwt-js1/src/main/java/me/ederign/client/JS.java
https://github.com/ederign/gwt-playground/blob/master/gwt-js1/src/main/java/me/ederign/client/JS.java
In your demo, works. :)
What I'm trying to do: http://realtimeplayground.goodow.com/, var p =
new realtime.store.Store("a")
In my project:
var a = js.JS('fsdfsd')
ReferenceError: js is not define
Thanks for your help.
ps. I sent a PR for a small issue in your project. :)
Obrigado
_____________
Eder Ignatowicz
2014-07-14 12:04 GMT-03:00 田传武 <i...@goodow.com>:> You can see a more simple example demonstrates the usages of JsExport. It
> only exports three interfaces, see also:
>
> https://github.com/goodow/realtime-channel/blob/master/src/main/java/com/goodow/realtime/channel/Bus.java
> https://github.com/goodow/realtime-channel/blob/master/src/main/java/com/goodow/realtime/channel/impl/ReconnectBus.java
>
> and the live playground.
>
>
>
>>> To post to this group, send email to google-we...@googlegroups.com.> On Mon, Jul 14, 2014 at 10:56 PM, 田传武 <i...@goodow.com> wrote:
>>
>> Which linker do you use in your .gwt.xml module?
>>
>> Normally, the exported stuff will not be available in JS until your GWT
>> app is fully loaded.
>>
>> On Monday, July 14, 2014 10:31:18 PM UTC+8, Eder Ignatowicz wrote:
>>>
>>> Hi,
>>>
>>> I'm starting to play with the new GWT features of JS Interopt. But
>>> unfortunately I can not make the Hello World. :/
>>>
>>> I want to make a Java Class accessible on JS.
>>>
>>> Could anyone help me or point the right direction?
>>>
>>> My @JsType
>>>
>>> My Class:
>>>
>>> @JsNamespace("$wnd.pug")
>>> public class SampleClass implements SampleInterface {
>>>
>>> @JsExport("Dora")
>>> public SampleClass( String s ){
>>>
>>> }
>>> }
>>>
>>>
>>> My pom:
>>>
>>> <dependency>
>>> <groupId>com.google.gwt</groupId>
>>> <artifactId>gwt-dev</artifactId>
>>> <version>2.7.0-SNAPSHOT</version>
>>> </dependency>
>>> <dependency>
>>> <groupId>com.google.gwt</groupId>
>>> <artifactId>gwt-user</artifactId>
>>> <version>2.7.0-SNAPSHOT</version>
>>> </dependency>
>>>
>>>
>>> The scope pug are not visible on JS. Am I missing something?
>>>
>>> Another stuff that I tried follow this example
>>>
>>> https://github.com/ederign/realtime-store/blob/master/src/main/java/com/goodow/realtime/store/impl/HtmlStoreEntryPoint.java#L42-42
>>> are patching the prototype. In that case I got the follow exception:
>>>
>>> https://gist.github.com/anonymous/b6dc2bf95cc6dbedf1df
>>>
>>>
>>> Does anyone have any idea of where I'm going wrong?
>>>
>>> Does anyone can point me a project using this? Or a doc?
>>>
>>>
>>> Thanks in advance
>>>
>>> _____________
>>> Eder Ignatowicz
>>> ignat...@gmail.com
>>
>> --
>> You received this message because you are subscribed to a topic in the
>> Google Groups "Google Web Toolkit" group.
>> To unsubscribe from this topic, visit
>> https://groups.google.com/d/topic/google-web-toolkit/fGIr4sRkz7s/unsubscribe.
>> To unsubscribe from this group and all its topics, send an email to
>> google-web-toolkit+unsubscribe@googlegroups.com.
>>>> Visit this group at http://groups.google.com/group/google-web-toolkit.> To post to this group, send email to google-we...@googlegroups.com.
>> For more options, visit https://groups.google.com/d/optout.
>
>
> --
> 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.> Visit this group at http://groups.google.com/group/google-web-toolkit.
> For more options, visit https://groups.google.com/d/optout.--
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.
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