Tuesday, November 1, 2016

Strange error with streams

Hi,

Why the following code throw runtime exception ConsoleLogger.java:32 ReferenceError: jQw_g$ is not defined at MCw_g$.RCw_g$ [as createButtons_5_g$] (MessageBox.java:57)

         Stream.of(actions).map(this::createButton).forEach(p::add);

while the classic equivalent works without errors

        for (final Action action : actions) {
            p.add(createButton(action));
        }

where actions is Action[];

In chrome debugger it fails after return from map method.

BTW somebody knows how in Chrome debugger switch between Java and underlying JavaScript code?

Best,
Stas

--
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 post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at https://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment