Hi ASlak,

It should work. I already  did that.

Don't forget that, finally, all your java code will be translated in
optimized javascript.
I haven't enough element about your problem to really help you.

So, here's my proposition.

1) build your application as you usually do
2) run it in firefox
3) install firebug, a firefox extension wich provide a javascript debuger
with breakpoint management and step debuging
4) open tab "javascript" in firebug and set a breakpoint where your
javascipt method is called
5) watch your variables, fields...etc...and try  to analyse what is
happening.

I used this methodology to track some jsni method behaviour, difficult to
debug, from the point of view of java.

I hope it helps.

Regards.

Karim Duran

2011/8/8 ASlak <[email protected]>

> I have some code in my host html page that I would like to call one of
> my java methods from.
>
> The relevant part of the html looks like:
> <script>
> if(myCondition){
> sendRequest(myVar);
> }
> </script>
>
> I have a method in my java code for my gwt project that is called
> sendRequest.
>
> I am also using a method that looks like:
> public native void exportMethod(myApp app)/*-{
> $wnd.sendRequest =
> $entry([email protected]::sendRequest(Ljava/
> lang/String;));
> }-*/;
>
>
> This is based off of what I found in the gwt documentation here:http://
> code.google.com/webtoolkit/doc/latest/DevGuideCodingBasicsJSNI.html
>
> The problem is that this is not working, and I am not sure why.
>
> I would appreciate it if anyone could give me a hint.
>
> Thanks
>
> --
> 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.
>
>

-- 
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