On 11 déc, 07:31, JavaDoc <[email protected]> wrote:
> Hello,
>
> Ive associated a certain FooBar.js to my module.
> The javascript has a method Foo(), which I need to invoke.
>
> I am trying to do this through JSNI, however, its failing. Heres my
> code:
>
> public native void doSomething() /*-{
> var bar = new Foo();
> //some other stuff
>
> }-*/;
>
> This method is being called through an onClick event of a GWT button.
>
> I am however, getting this exception in my console:
>
> [ERROR] Uncaught exception escaped
> com.google.gwt.core.client.JavaScriptException: (TypeError): 'Foo' is
> undefined
>  number: -2146823279
>
> Please help me out!!!! :(

var bar = new $wnd.Foo();

See 
http://code.google.com/webtoolkit/doc/latest/DevGuideCodingBasics.html#DevGuideJavaScriptNativeInterface

--

You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.


Reply via email to