Thursday, September 10, 2020

Weird type error in lambdas with generics, with JsInterop

Hi all,

I'm trying to migrate some of my JSNI code to JsInterop. In particular HTML File System API which I'm using with Cordova and in the browser for testing.
There are some full-on Callback interfaces which uses generics and lambdas in the code. I'm not 100% certain if it's JsInterop or Lambda related (I'm running GWT 2.8.2).

In various places I'm now getting errors like this:

SEVERE: Uncaught Exception on client: (TypeError) : Cannot read property '<REDACTED>' of undefined
com.google.gwt.core.client.JavaScriptException: (TypeError) : Cannot read property 'inspectivity' of undefined
at Unknown.onSuccess_321_g$(FileStorageImpl.java:475)
at Unknown.getRootDataDirectory_0_g$(BrowserFileSystemPlatform.java:100)
at Unknown.clear_99_g$(FileStorageImpl.java:473)
....

There is no property '<REDACTED>" anywhere - it's the application name. And the error is on line 475 which is the "onSuccess" method method definition.

I have been trying various approaches all afternoon and it seems to get better when I rewrite parts of the code to avoid generics.

Has anyone else run into similar problems?

Cheers,
Thomas




--
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/bf640791-ff3a-4604-9025-326d3ca6eb56n%40googlegroups.com.

No comments:

Post a Comment