Hi All,

Im trying to use jsni to implement a interface (a callback) and use it
as an argument in a function. here is what i have:

-------------------------------------------------

 package com.mypackage;

 public interface MyCallback {

      public void onResponseReceived(String text);

 }

 ------------------------------------------------

 package com.mypackage;

 public class MyClass {
         public static String send(String text,MyCallback callback) {
                 callback.onResponseReceived(text);
                 return "";
         }

         private native void publish() /*-{
             $wnd.send = @com.mypackage.MyClass::send(Ljava/lang/
String;com/mypackage/MyCallback;);
         }-*/;

 }

------------------------------------------------

im stuck, because "com/mypackage/MyCallback" is not considered a valid
type, also , im not sure how i can implement in javascript the
MyCallback interface/class.

Any ideas?
--~--~---------~--~----~------------~-------~--~----~
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