Hi

I have trouble modeling WindowTimers.setTimeout() with JsInterop.

I have tried something roughly like this

@JsType(isNative = true, namespace = JsPackage.GLOBAL)
public interface WindowTimers {
  int setTimeout(Object handler, int timeout, Object... arguments);
}

@JsType(isNative = true, namespace = JsPackage.GLOBAL)
public abstract class Window WindowTimers {
}

along with a MyFunction

@JsFunction
public interface MyFunction<T> {
  void execute(T ... args);
}

and I invoke it like this

getWindow().setTimeout((MyFunction) args -> window.alert("Hello " + 
args[0]), 1000, "World");

I get a popup saying "Hello W" where I would expect it to say "Hello World"

best regards
Rene


-- 
You received this message because you are subscribed to the Google Groups "GWT 
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.

Reply via email to