In development mode `$entry(...)` converts `false` to `Boolean(false)` which can be evaluated to true

9 views
Skip to first unread message

Ali

unread,
Dec 29, 2011, 4:32:44 PM12/29/11
to google-we...@googlegroups.com
Hi

In following example (v2.3.0 development mode) `$entry()` converts returned `false` to `Boolean(false)` which can be evaluated to true if used immediately.

public class Example {
    public boolean test() { return false; }
    public native void inject() /*-{
    var self = this;
    $wnd.test = $entry(function(){ return self.@my.gwt.client.Example::test()(); });
    }-*/;
}

in js
alert(
test() + "=" + (test() ? true : false));
results in `false=true`.

Is this a bug or I have used it incorrectly?

Sanjiv Jivan

unread,
Dec 29, 2011, 4:55:15 PM12/29/11
to google-we...@googlegroups.com
I hit the same issue as well. See the thread below which describes problem and a workaround.


Sanjiv

--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To view this discussion on the web visit https://groups.google.com/d/msg/google-web-toolkit/-/HqVtZcnQ4B4J.
To post to this group, send email to google-we...@googlegroups.com.
To unsubscribe from this group, send email to google-web-tool...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.

Reply all
Reply to author
Forward
0 new messages