Goktug, this is an example perfectly working with jsInteropMode=JS but not
working with JS_RC :
  (Errors : Native JsType field 'String MyComponent.TAG' cannot have
initializer &  Native JsType method 'String MyComponent.getTagName()'
should be native or abstract)

@com.google.gwt.core.client.js.JsType

@jsinterop.annotations.JsType(isNative=true)

public interface MyComponent {

 public static String TAG = "my-component";

 public static String getTagName() {

   return TAG;

 }

 @jsinterop.annotations.JsProperty

 @com.google.gwt.core.client.js.JsProperty

 public String getFoo();

 @jsinterop.annotations.JsProperty

 @com.google.gwt.core.client.js.JsProperty

 public void setFoo(String foo);

}


public void onModuleLoad() {

 assert MyComponent.getTagName() == MyComponent.TAG;

 Element elem = Document.get().createElement(MyComponent.TAG);

 Document.get().getBody().appendChild(elem);

 MyComponent comp = (MyComponent) elem;

 comp.setFoo("bar");

}





On Wed, Nov 11, 2015 at 6:25 AM, 'Goktug Gokdogan' via GWT Contributors <
[email protected]> wrote:

> In native types, the support for static methods are same as the support
> for static fields; only overlays are supported because we don't modify the
> native types. Can you give an example that works with static methods and
> doesn't work with static field but should work as well? What do you mean by
> "static shared fields"?
>
>
> wrt. overloading: we are not planning to support automatic dispatches per
> argument count in this version. And btw, method overloading never worked
> earlier and we recently added support and just for native types.
>
> On Tue, Nov 10, 2015 at 4:19 PM, Manuel Carrasco Moñino <[email protected]
> > wrote:
>
>>
>> Another issue in the new implementation is that it's not supported any
>> more static shared fields in JsType native interfaces, I think if we
>> support static methods we should support static fields as well, or is there
>> i any reason to prevent it ?.
>>
>> On Tue, Nov 10, 2015 at 6:11 PM, Manuel Carrasco Moñino <
>> [email protected]> wrote:
>>
>>> var args sounds pretty good, but some kind of overloading based on the
>>> number of parameters like we had in gwt-exporter should cover many use
>>> cases, compiler could give an error (like it does now) when it sees two
>>> methods with the same-number-of-parameters signature.
>>>
>>>
>>>
>>> On Tue, Nov 10, 2015 at 5:59 PM, 'Roberto Lublinerman' via GWT
>>> Contributors <[email protected]> wrote:
>>>
>>>> No plan to support through Java implementors, although there are plans
>>>> to support varargs which would let you accomplish something similar.
>>>> On Nov 10, 2015 08:53, "Manuel Carrasco Moñino" <[email protected]>
>>>> wrote:
>>>>
>>>>> I see, it works, thanks.
>>>>>
>>>>> Any plan to work as well with gwt exported classes ?
>>>>>
>>>>> On Tue, Nov 10, 2015 at 5:33 PM, Julien Dramaix <
>>>>> [email protected]> wrote:
>>>>>
>>>>>> Method overloading works in native JsType JsType(isNative=true)
>>>>>>
>>>>>> On Tue, Nov 10, 2015 at 5:15 PM Manuel Carrasco Moñino <
>>>>>> [email protected]> wrote:
>>>>>>
>>>>>>> Seems that method overloading is not working anymore with JS_RC
>>>>>>> mode, it was working in JS mode though:
>>>>>>>
>>>>>>> Example:
>>>>>>>
>>>>>>>    boolean validate()
>>>>>>>    boolean validate(String foo)
>>>>>>>
>>>>>>> Is it a feature not implemented yet, or it is not in the
>>>>>>> specification?
>>>>>>>
>>>>>>> Thanks
>>>>>>> - Manolo
>>>>>>>
>>>>>>>
>>>>>>> On Mon, Nov 9, 2015 at 3:40 PM, Cristian Rinaldi <
>>>>>>> [email protected]> wrote:
>>>>>>>
>>>>>>>> Thanks Julien!!!
>>>>>>>>
>>>>>>>> This work fine!!
>>>>>>>>
>>>>>>>> El viernes, 23 de octubre de 2015, 4:13:55 (UTC-3), Goktug Gokdogan
>>>>>>>> escribió:
>>>>>>>>>
>>>>>>>>> As we are getting close to 2.8 release I wrote a new document that
>>>>>>>>> is concentrating on jsinterop features to be released in 2.8:
>>>>>>>>>
>>>>>>>>> https://docs.google.com/document/d/10fmlEYIHcyead_4R1S5wKGs1t2I7Fnp_PaNaa7XTEk0/edit#
>>>>>>>>>
>>>>>>>>> Please share your feedback.
>>>>>>>>>
>>>>>>>>> Thanks,
>>>>>>>>>
>>>>>>>>> Goktug
>>>>>>>>>
>>>>>>>> --
>>>>>>>> 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
>>>>>>>> [email protected].
>>>>>>>> To view this discussion on the web visit
>>>>>>>> https://groups.google.com/d/msgid/google-web-toolkit-contributors/51f767f9-0afd-48fd-bef8-a9106b0d716a%40googlegroups.com
>>>>>>>> <https://groups.google.com/d/msgid/google-web-toolkit-contributors/51f767f9-0afd-48fd-bef8-a9106b0d716a%40googlegroups.com?utm_medium=email&utm_source=footer>
>>>>>>>> .
>>>>>>>>
>>>>>>>> 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
>>>>>>> [email protected].
>>>>>>> To view this discussion on the web visit
>>>>>>> https://groups.google.com/d/msgid/google-web-toolkit-contributors/CAM28XAtrYCKBHtp6ccqnxTq%3Dq2EK8jB-A57qqFX05U2sw6-12w%40mail.gmail.com
>>>>>>> <https://groups.google.com/d/msgid/google-web-toolkit-contributors/CAM28XAtrYCKBHtp6ccqnxTq%3Dq2EK8jB-A57qqFX05U2sw6-12w%40mail.gmail.com?utm_medium=email&utm_source=footer>
>>>>>>> .
>>>>>>> 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
>>>>>> [email protected].
>>>>>> To view this discussion on the web visit
>>>>>> https://groups.google.com/d/msgid/google-web-toolkit-contributors/CABb_3%3D62mQ0iqjRBc8E8vbPTWqtE61gUcb-1qbKATt8wtrsUTw%40mail.gmail.com
>>>>>> <https://groups.google.com/d/msgid/google-web-toolkit-contributors/CABb_3%3D62mQ0iqjRBc8E8vbPTWqtE61gUcb-1qbKATt8wtrsUTw%40mail.gmail.com?utm_medium=email&utm_source=footer>
>>>>>> .
>>>>>>
>>>>>> 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
>>>>> [email protected].
>>>>> To view this discussion on the web visit
>>>>> https://groups.google.com/d/msgid/google-web-toolkit-contributors/CAM28XAtTjvgcdJLojY4C4ouNzDUOBOXTF_TKjxRA8V2Azjoecw%40mail.gmail.com
>>>>> <https://groups.google.com/d/msgid/google-web-toolkit-contributors/CAM28XAtTjvgcdJLojY4C4ouNzDUOBOXTF_TKjxRA8V2Azjoecw%40mail.gmail.com?utm_medium=email&utm_source=footer>
>>>>> .
>>>>> 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
>>>> [email protected].
>>>> To view this discussion on the web visit
>>>> https://groups.google.com/d/msgid/google-web-toolkit-contributors/CAC7T7gk0jt7HDSPDX22f9LX5SLdxK8Hm9D1rzo92ac2qzoMXHw%40mail.gmail.com
>>>> <https://groups.google.com/d/msgid/google-web-toolkit-contributors/CAC7T7gk0jt7HDSPDX22f9LX5SLdxK8Hm9D1rzo92ac2qzoMXHw%40mail.gmail.com?utm_medium=email&utm_source=footer>
>>>> .
>>>>
>>>> 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 [email protected].
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/google-web-toolkit-contributors/CAM28XAsdPGjuGR7eNg-YMjBGwiLcc3P2dHXhk%3D20e5rRfdSqKg%40mail.gmail.com
>> <https://groups.google.com/d/msgid/google-web-toolkit-contributors/CAM28XAsdPGjuGR7eNg-YMjBGwiLcc3P2dHXhk%3D20e5rRfdSqKg%40mail.gmail.com?utm_medium=email&utm_source=footer>
>> .
>>
>> 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 [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/google-web-toolkit-contributors/CAN%3DyUA3CdLwYNzV32FwfWZkqx%3DL3PyTDy3%3DTR0L%2BnkF-_xWADw%40mail.gmail.com
> <https://groups.google.com/d/msgid/google-web-toolkit-contributors/CAN%3DyUA3CdLwYNzV32FwfWZkqx%3DL3PyTDy3%3DTR0L%2BnkF-_xWADw%40mail.gmail.com?utm_medium=email&utm_source=footer>
> .
>
> 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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-web-toolkit-contributors/CAM28XAv6B%2BHTm4wZ-2rDHYrx57StRiCX30a%2BH1Ah4EODnMAuZA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to