On Mar 22, 4:23 pm, ChrisK <cknow...@gmail.com> wrote:
> My above code got a little mangled along the way, the $entry part has
> "(this", followed by a full stop, followed by
> "@com.mine.PlayerImpl::callback());"

And that's the problem: "this" is a special keyword and will evaluate
to the "this" context of the calling "plain JS" code, whereas you'd
want it to be some PlayerImpl instance.

There are several ways to fix this:
  // evaluates "this" right now
  var that = this;
  // then uses "that"
  $wnd.js_callback = $entry(t...@com.mine.playerimpl::callback());

or pass the instance as an argument to the method and then use its
name.

But there's another bug in your code: there's no "this" in a "static"
method!

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

Reply via email to