Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Bear Bibeault
  • Paul Clapham
  • Jeanne Boyarsky
  • Knute Snortum
  • Liutauras Vilda
  • Tim Cooke
  • Junilu Lacar
Saloon Keepers:
  • Ron McLeod
  • Stephan van Hulst
  • Tim Moores
  • Tim Holloway
  • Carey Brown
  • Joe Ess
  • salvin francis
  • fred rosenberger

JSNI - invoking native method from another native method

Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am newbie to JSNI + GWT.

I have two native methods and the requirement is to invoke one of the native method from another native method, I am not sure if this is possible, if so how should I able to call the another native method from the native method.

Below is the code snippet.

Thanks in advance.

public static native void testFunction() /*-(
var $ = $wnd.$;
function testMyFunction(){
alert("hello world!");

public static native void commonjQuery() /*-{
var $ = $wnd.$;


testFunction(); --> Trying to invoke testFunction() from here, but it doesn't seem to work, please help in suggesting how this can be achieved.

var mainWidth;
var mainHeight;
var headerHeight;


Senthil Jayakumar
[Thumbnail for native_method.JPG]
I'm THIS CLOSE to ruling the world! Right after reading this tiny ad:
Java file APIs (DOC, XLS, PDF, and many more)
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!