title: Native Javascript method in GWT
body: <p>I have a native Javascript method in one of my GWT Java classes, but I'm having trouble calling my Java methods from the native Javascript code. I tried to follow <a href="http://code.google.com/webtoolkit/doc/1.6/DevGuideCodingBasics.html#DevGuideJavaScriptNativeInterface" rel="noreferrer">this</a> as closely as I could, but I can't get it to work. I compiled it and ran it in Firefox, and the error console said <em>"Error: this.lc is not a function"</em>. I tried changing all the methods to <em>public</em>, but that didn't seem to make a difference. What am I doing wrong?</p>
  
  <pre><code>package com.proprintsgear.design_lab.client;
  ...
  public class ValueBox extends HorizontalPanel {
  ...
  private void fireChange() {
      ...
  }
  
  private void increaseValue() {
      ...
  }
  
  private native void addNativeMouseWheelListener(String id) /*-{
      function mouseOverHandler(e) {
          $wnd.addEventListener("DOMMouseScroll", scrollWheelMove, false);
      }
  
      function mouseOutHandler(e) {
          $wnd.removeEventListener("DOMMouseScroll", scrollWheelMove, false);
      }
  
      function scrollWheelMove(e) {
          if ($wnd.event || $wnd.Event) {
              if (!e) e = $wnd.event;
              if (e.wheelDelta &lt;= 0 || e.detail &gt; 0 ) {
                  $wnd.alert("DOWN");
              } else {
                  this.@com.proprintsgear.design_lab.client.ValueBox::increaseValue()();
              }
              this.@com.proprintsgear.design_lab.client.ValueBox::fireChange()();
          }
      }
  
      var box=$doc.getElementById(id);
      box.addEventListener("mouseout",mouseOutHandler,false);
      box.addEventListener("mouseover",mouseOverHandler,false);
  }-*/;
  </code></pre>