I actually implemented with simple eval for demonstration purposes but
probably yours is preferable :)

Yes, GWT.jsni is one of the use cases for method rebinding; that was
something I was discussing as part of the original discussion.

In reality GWT.jsni is better to be implementable without "native" method
definitions so we could eventually take native methods out of the compiler.
There are also other use cases like String.format, GWT.debugger and
GWT.create itself. The ideal solution should cover all to avoid redundant
features in the SDK.


On Mon, Dec 16, 2013 at 10:00 AM, Andrés Testi <andres.a.te...@gmail.com>wrote:

> This morning I read the Goktug's slides and was surprised by the
> GWT.jsni() method. It is a nice use case for rebinding methods. I just
> added a version of GWT.jsni() to HelloRebinding sample, implementing it as
> a rebinding method (no compiler mods). It took me just 30 minutes of coding
> to add an extension to support this:
>
>     JsniUtil.jsni("$wnd.alert(#)", message);
>
> - Usage:
> https://github.com/andrestesti/gwt-rebindingmethods/blob/master/samples/hellorebinding/src/com/google/gwt/sample/hellorebinding/client/MainWidget.java#L65
>
> - 
> Definition:https://github.com/andrestesti/gwt-rebindingmethods/blob/master/samples/hellorebinding/src/com/google/gwt/sample/hellorebinding/client/util/JsniUtil.java#L38
>
> - Generator:
> https://github.com/andrestesti/gwt-rebindingmethods/blob/master/samples/hellorebinding/src/com/google/gwt/sample/hellorebinding/rebind/JsniSnippetGenerator.java#L32
>
>
> Regards.
>
> - Andrés Testi
>
>
>  --
> http://groups.google.com/group/Google-Web-Toolkit-Contributors
> ---
> 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+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
>

-- 
http://groups.google.com/group/Google-Web-Toolkit-Contributors
--- 
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+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to