[gwt-contrib] Jsni on String methods in GWT 2.7

2015-03-29 Thread James Nelson
I'm not sure if this is intended, but I've noticed that JSNI methods on string do not work. I tried equals, compareTo, compareToIgnoreCase and charAt, but none of them worked. I used my fork and the pristine 2.7, and in super dev + regular compile; in all cases, the functions come back undefined

Re: [gwt-contrib] Jsni on String methods in GWT 2.7

2015-03-30 Thread 'Roberto Lublinerman' via GWT Contributors
GWT strings and arrays are JS native strings and arrays (no prototype monkey patching), in Java code calls to Object, String, Array and Comparable methods are devirtualized if applied to instances typed at one of those types. So the answer is yes: You wont be able to call instance methods this way

Re: [gwt-contrib] Jsni on String methods in GWT 2.7

2015-03-30 Thread 'Roberto Lublinerman' via GWT Contributors
Please file an issue to keep track. On Mon, Mar 30, 2015 at 9:06 AM, Roberto Lublinerman wrote: > GWT strings and arrays are JS native strings and arrays (no prototype > monkey patching), in Java code calls to Object, String, Array and > Comparable methods are devirtualized if applied to instanc

Re: [gwt-contrib] Jsni on String methods in GWT 2.7

2015-03-30 Thread 'Goktug Gokdogan' via GWT Contributors
Same also applies to JSOs. (i.e. You cannot call JSO methods with JSNI). On Mon, Mar 30, 2015 at 9:06 AM, 'Roberto Lublinerman' via GWT Contributors wrote: > GWT strings and arrays are JS native strings and arrays (no prototype > monkey patching), in Java code calls to Object, String, Array and

Re: [gwt-contrib] Jsni on String methods in GWT 2.7

2015-03-30 Thread James Nelson
Ok, great. Thanks for the heads up. I was pretty sure that Strings had become native first-class objects. Since JSOs will all have public methods, I will be safe with the same fix for String (not using JSNI if not necessary). Given that java arrays only have one field, and that field does not

Re: [gwt-contrib] Jsni on String methods in GWT 2.7

2015-03-31 Thread Colin Alworth
Getting offtopic, but there is absolutely no requirement that JSO methods are public. See dom.client.Element for several examples of private methods. On Mon, Mar 30, 2015 at 10:27 PM James Nelson wrote: > Ok, great. Thanks for the heads up. I was pretty sure that Strings had > become native fi

Re: [gwt-contrib] Jsni on String methods in GWT 2.7

2015-04-02 Thread James Nelson
I stand very much corrected. /hat tip/ I suppose I've already been using JsType so much it has begin to cloud my judgement. Hm. How ironic that the only methods unreachable to reflection-via-jsni would be private jsni methods? :-) -- You received this message because you are subscribed to the

Re: [gwt-contrib] Jsni on String methods in GWT 2.7

2015-04-02 Thread James Nelson
I suppose I technically have access to the AST nodes... If I *really *wanted to I could probably find a way, but that would be exceptionally nasty, so, no thanks... -- You received this message because you are subscribed to the Google Groups "GWT Contributors" group. To unsubscribe from this