@JsType(prototype = "jQuery")
public interface JQueryElement {
JQueryElement append(JQueryElement element);
@JsProperty
JQueryElement html();
void data(String key, String value);
Object val();
void on(String event, com.workingflows.js.jscore.client.api.Function<?,?> fn);
void attr(String attr, Object value);
} public class SwitchElement extends JavaScriptObject {
protected SwitchElement() {
}
public final native boolean getState()/*-{
return this.bootstrapSwitch("state");
}-*/;
public final native void setState(boolean state)/*-{
this.bootstrapSwitch("state", state);
}-*/;
}public class SwitchElement extends JQueryElement.Prototype{
protected SwitchElement() {
}
public final native boolean getState()/*-{
return this.bootstrapSwitch("state");
}-*/;
public final native void setState(boolean state)/*-{
this.bootstrapSwitch("state", state);
}-*/;
}>> > email to google-web-toolkit-contributors+unsubscribe@googlegroups.com.
>> > To view this discussion on the web visit
>> >
>> > https://groups.google.com/d/msgid/google-web-toolkit-contributors/8f6cf42a-2910-4536-a2f7-1ae2d55422ac%40googlegroups.com.
>> > For more options, visit https://groups.google.com/d/optout.
>
> --
> You received this message because you are subscribed to the Google Groups
> "GWT Contributors" group.
> To unsubscribe from this group and stop receiving emails from it, send an
To view this discussion on the web visit https://groups.google.com/d/msgid/google-web-toolkit-contributors/83bedee9-2b9c-46ec-a20b-c1c68d7f55f9%40googlegroups.com.To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit-co...@googlegroups.com.
@JsType(prototype="Window") and @JsType
It does not become very clear from the documentation.
Here is the interface I implemented:
@JsType(prototype="Window")
public interface MyWindow {
public static abstract class Statics {
public static native MyWindow create() /*-{
var w = $wnd;
return w;
}-*/;
}
void alert(String msg);
}
[ERROR] Line 46: Rebind result 'test.client.MyWindow' must be a class
Unification traversed 735 fields and methods and 538 types. 7 are considered part of the current module and 7 had all of their fields and methods traversed.
[ERROR] Compiler returned false
Two questions:
1. When do I use or do I not use the prototype and isNative attribute of @JsType?
2. Do I use the correct way to instantiate a JSInterop Interface?
>> > email to google-web-toolkit-contributors+unsubscribe@googlegroups.com.
>> > To view this discussion on the web visit
>> >
>> > https://groups.google.com/d/msgid/google-web-toolkit-contributors/8f6cf42a-2910-4536-a2f7-1ae2d55422ac%40googlegroups.com.
>> > For more options, visit https://groups.google.com/d/optout.
>
> --
> You received this message because you are subscribed to the Google Groups
> "GWT Contributors" group.
> To unsubscribe from this group and stop receiving emails from it, send an
>> >> > To view this discussion on the web visit
>> >> >
>> >> >
>> >> > https://groups.google.com/d/msgid/google-web-toolkit-contributors/8f6cf42a-2910-4536-a2f7-1ae2d55422ac%40googlegroups.com.
>> >> > For more options, visit https://groups.google.com/d/optout.
>> >
>> > --
>> > You received this message because you are subscribed to the Google
>> > Groups
>> > "GWT Contributors" group.
>> > To unsubscribe from this group and stop receiving emails from it, send
>> > an
>> > email to google-web-toolkit-contributors+unsubscribe@googlegroups.com.
>> > To view this discussion on the web visit
>> >
>> > https://groups.google.com/d/msgid/google-web-toolkit-contributors/51be727d-0003-425b-9040-bd3c8529ddd1%40googlegroups.com.
>> >
>> > For more options, visit https://groups.google.com/d/optout.
>
> --
> You received this message because you are subscribed to the Google Groups
> "GWT Contributors" group.
> To unsubscribe from this group and stop receiving emails from it, send an
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit-co...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-web-toolkit-contributors/94cce332-a8c7-4790-98a8-e752a5fd3dd8%40googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-web-toolkit-contributors/CAPVRV7f%2B4eRXykaK%3D-D9mqNBgcfe-ziyKUoHqP-y5eNyA3PAOg%40mail.gmail.com.
Consider an interface@JsTypeinterface Test {void do();}How do I instantiate such an interface?
To view this discussion on the web visit https://groups.google.com/d/msgid/google-web-toolkit-contributors/89359bef-175d-4a96-9362-787fed32888d%40googlegroups.com.To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit-co...@googlegroups.com.