Open wowoName opened 6 months ago
Can you clarify what you mean by "it doesn't work" - the data is missing, the JS is incorrect, etc? Maybe share some code snippets as text instead of images?
Any other errors/warnings when compiling? it doesn't look correct to use goog.require
to reference a class compiled by j2cl - should be goog.module.get()
instead probably (since they are registered with goog.module
, not goog.provides
).
Also, I don't yet understand the use case, but externs might be more correct than exports, if the JS isnt being exported correctly.
@niloc132 I would like to have some details about goog.exportSymbol
What I mean by not working is when I execute code in the browser console
clientCore.getActiveUnits()[0].getSideName();
A message is displayed indicating that the current method does not exist。
@wowoName i see, it's quite complex topic, I suggest you to take a look at https://github.com/treblereel/gwt3-processors @GWT3Export section. It might help you export your type into js.
ps. if you have any q, you can reach me out at Vertispan/j2cl channel at element
@treblereel I joined in the project 'org. Treblereel. J2cl. Processors' At the same time, adding the comment @GWT3Export to the 'getSideName' method can compile and package normally, and the compiled package is no different from the previous one. Next do not know how to change the modification ~
I'm sorry I wasn't accurate, but here's what my code looks like。 This code should work in the browser console But when I call the 'getSideName' method in 'ActiveUnitAgent' through the call console with the data I got in step 1, it doesn't work. code: clientCore.getActiveUnits()[0].getSideName();
How should I modify it? Thank you very much!!!