Tuesday, May 12, 2020

Re: JsInterop - fail to iterate @JsType in List

Hi @Jens

Can be project referring to my package name?
But I confirm the log is correct and it's produced by this exact sample

package com.project.client;

import jsinterop.annotations.JsPackage;
import jsinterop.annotations.JsProperty;
import jsinterop.annotations.JsType;

@JsType(isNative = true)
public class Car {
 @JsProperty(namespace = JsPackage.GLOBAL) public static Car car;

  public native String start();
}




On Tuesday, May 12, 2020 at 5:28:27 PM UTC+10, Jens wrote:

But it fails with the following logs:
direct call: start
ConsoleLogger.java:33 FAILED to iterate a @JsType in a List
ConsoleLogger.java:55 Exception: com.google.gwt.core.client.JavaScriptException: (TypeError) : Cannot read property 'project' of undefined
ConsoleLogger.java:33 TypeError: Cannot read property 'project' of undefined
at dse_g$ (App.java:75)
at tse_g$.use_g$ [as execute_1_g$] (App.java:66)

Where does 'project' come from? Looks like the exception does not match the example code?

-- J. 

--
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 google-web-toolkit+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-web-toolkit/dfeb5e37-0518-48f5-941e-c852f595aeb5%40googlegroups.com.

No comments:

Post a Comment