Re: [gwt-contrib] $entry and wrapping result as Object in hosted mode

2010-04-11 Thread Sanjiv Jivan
Thank's for the tip Ray. Unfortunately I'm not seeing the desired results with Boolean, while Number works fine. However .valueOf() does return the correct result. Boolean.apply(null, [Object(false)]) true Number.apply(null, [Object(5)]) 5 (Object(false)).valueOf() false

[gwt-contrib] Direction estimators are simple classes which estimate a string's direction using various heuris... (issue338801)

2010-04-11 Thread tomerigo
Reviewers: jat, Description: Direction estimators are simple classes which estimate a string's direction using various heuristics. This is useful for automatically setting the direction of an element that contains text. Please review this at http://gwt-code-reviews.appspot.com/338801/show

[gwt-contrib] Re: Direction estimators are simple classes which estimate a string's direction using various heuris... (issue338801)

2010-04-11 Thread jat
Mostly LGTM. Aside from individuaal comments, can you clarify how these different estimators will be used? It seems like most code is just going to use the default. http://gwt-code-reviews.appspot.com/338801/diff/1/4 File user/src/com/google/gwt/i18n/shared/DirectionEstimator.java (right):

[gwt-contrib] Re: Direction estimators are simple classes which estimate a string's direction using various heuris... (issue338801)

2010-04-11 Thread tomerigo
http://gwt-code-reviews.appspot.com/338801/show -- http://groups.google.com/group/Google-Web-Toolkit-Contributors

[gwt-contrib] Re: Direction estimators are simple classes which estimate a string's direction using various heuris... (issue338801)

2010-04-11 Thread tomerigo
Different estimation heuristics may be needed for different use cases. For example, for a short input box where the direction behavior should be clear, the first-strong heuristic is generally preferable (it is used, for example, in Google.co.il). For long paragraphs the word-count is better since

[gwt-contrib] Re: Direction estimators are simple classes which estimate a string's direction using various heuris... (issue338801)

2010-04-11 Thread jat
I assume you have run the tests including checkstyle? http://gwt-code-reviews.appspot.com/338801/diff/1/9 File user/test/com/google/gwt/i18n/shared/AnyRtlDirectionEstimatorTest.java (right): http://gwt-code-reviews.appspot.com/338801/diff/1/9#newcode25

Re: [gwt-contrib] $entry and wrapping result as Object in hosted mode

2010-04-11 Thread Ray Cromwell
Interesting, which browser? I just tried this in the Chrome console: x = Object(true) typeof(x) = object y = Boolean.apply(null, [x]); typeof(y) = boolean -Ray On Sun, Apr 11, 2010 at 6:32 AM, Sanjiv Jivan sanjiv.ji...@gmail.com wrote: Thank's for the tip Ray. Unfortunately I'm not seeing the

Re: [gwt-contrib] $entry and wrapping result as Object in hosted mode

2010-04-11 Thread Sanjiv Jivan
I had originally tried on Safari 4.0.4 on OSX but just tried on Chrome (win) and FF and got the same results. So what you have is fine, the type returned on calling Boolean.apply(null, [Object(true)] ) is indeed boolean. The issue is that the value returned is incorrect when the original val is

Re: [gwt-contrib] $entry and wrapping result as Object in hosted mode

2010-04-11 Thread Ray Cromwell
Doh, you've right, boy do I love Javascript. If you specify any object, including a Boolean object whose value is false, as the initial value of a Boolean object, the new Boolean object has a value of true. -Ray On Sun, Apr 11, 2010 at 4:24 PM, Sanjiv Jivan sanjiv.ji...@gmail.com wrote: I had