Sunday, May 19, 2019

Re: GWT-client math vs. java-math

The biggest difference I saw when running shared code between Java and JavaScript, was that JavaScript doesn't support floats (they will be treated as doubles in JavaScript).

--
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/34293ea4-9c78-4400-ae38-c382cb2877c3%40googlegroups.com.

Re: [GWT] [ERROR] Hint: Check that your module inherits 'com.google.gwt.core.Core'

I don't believe GWT supports Java 12 yet.  I'd recommend just using Java 8.

And you might want to use the latest GWT version (2.8.2).

--
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/4ca3b454-859f-4a6d-9e60-c935ae2d5ca5%40googlegroups.com.

An EventBus with less boiler plate

Apologies if this has been discussed before. The EventBus requires the declaration of an Event class and a Handler interface for each activity of interest, which often results in plenty of boiler plate. In one of our projects we came up with a simpler notation which doesn't require event classes - so all we write are Handler interfaces (and their implementations). This does however require a modified event bus.

Firing an event can be as simple as:

bus.fireEvent(Types.transactionEvents, (l)->l.deposit(depositDate, 150, "ATM"));

The traditonal event/handler design template always implements these steps:

- sender package data into an event
- sender fires event on the event bus
- event bus locates handlers and executes event on them
- event invokes a method on the handler and passes packaged data as arguments

The idea here is that it is slightly less work to directly invoke a listener method with the appropriate arguments instead of going through the event pack/unpack procedure.

The repo is here: https://github.com/ggeorgovassilis/lambda-listeners, feel free to use any way you like.

--
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/dac1af20-2eab-47c2-9e6b-a85b95c880e6%40googlegroups.com.

Re: GWT-client math vs. java-math

My testing has revealed that Math.sqrt does not yield the same results.

I think GWT just converts Math.sqrt to the JavaScript Math.sqrt function.  I noticed the JavaScript Math.sqrt function returns different results based on what browser, and what operating system you are using.

I couldn't think of a smart way to fix this to return the same result all the time, so I ended up just rounding the answer to 6 decimal places.

--
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/6ba3d382-416a-4127-897a-5973968a90f8%40googlegroups.com.

Saturday, May 18, 2019

[GWT] [ERROR] Hint: Check that your module inherits 'com.google.gwt.core.Core'

Hi all,

I haven't done GWT development for a while and wanted to try again. I installed JDK 12 and Eclipse 2019-03. I installed GWT Eclipse Plugin (GWT 2.8.1). 

From Eclipse, I created a hello world project this way:
  1. Click on 'New GWT Application Project'
  2.  Project name: Gwt5, Package: com.foo, Use default SDK (GWT 2.8.1)
  3. Click on 'GWT Compile Project'
I see this error:

Compiling module com.foo.Gwt5
   [ERROR] Hint: Check that your module inherits 'com.google.gwt.core.Core' either directly or indirectly (most often by inheriting module 'com.google.gwt.user.User')

I didn't change my gwt.xml.

Any suggestion?

--
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/1736e311-270f-42fa-bd61-bd3dcfbaf122%40googlegroups.com.

Friday, May 17, 2019

Re: Deobfuscated stack trace message and line-specific stack traces

Thank you Alexander!  That's what I was missing.

Called:
exception = SerializableThrowable.fromThrowable(exception);

before sending to the server, and now the stack traces show perfectly.  :-)

--
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/2282e254-fad7-48f3-9cfa-f5ff79de8d10%40googlegroups.com.

Thursday, May 16, 2019

Re: Deobfuscated stack trace message and line-specific stack traces

Do you wrapping exception with SerializableThrowable (com.google.gwt.core.shared.SerializableThrowable.fromThrowable(Throwable)) before sending to server?

On Friday, May 17, 2019 at 12:56:33 AM UTC+3, Craig Mitchell wrote:
I also tried compiling with Pretty and Detailed, both with the same result as Obfuscated.

When I debug the exception passed back to the server, the exception doesn't have any detail about the JS line that is occurred.  So, I don't understand how the StackTraceDeobfuscator would ever work?

Annotation 2019-05-17 075404.png


Any help much appreciated.

Thanks again!  :-)

--
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/1fcaed24-3d74-4882-be21-4c645ecc3af7%40googlegroups.com.