Re: Issue with migrating to GWT 2.10

2023-01-21 Thread Paul Stockley
Thanks, that was the issue. We had an old 5.x version of ASM in the 
classpath. Updated to 9.2 and it now compiles.

On Friday, January 20, 2023 at 4:23:55 AM UTC-5 Jens wrote:

> ASM is given a class file that has a newer byte code version than ASM 
> supports. GWT 2.10 depends on ASM 9.2 and supports byte code up to Java 18. 
> I am pretty sure you have an older ASM version on class path that came 
> first or some Java 19+ classes.
>
> -- J.
>
> Paul Stockley schrieb am Donnerstag, 19. Januar 2023 um 22:33:28 UTC+1:
>
>> I tried reducing the optimization level to 0, no difference. This has 
>> been a problem in the past. I need to turn on more debug info. I tried 
>> logLevel at ALL but it didn't really output anything new.
>>
>> On Thursday, January 19, 2023 at 4:05:22 PM UTC-5 Michael Joyner wrote:
>>
>>> Meh... I just saw the compile options below the empty pic.
>>>
>>>
>>> On 1/19/23 16:04, Michael Conrad wrote:
>>>
>>> a) Have you tried increasing heap space?
>>> b) Are you compiling production in STRICT mode? (Strongly recommended.)
>>> c) Are you running SDM in STRICT compile mode? (Strongly recommended.)
>>>
>>> On 1/19/23 14:43, Paul Stockley wrote:
>>>
>>> We are trying to migrate to GWT 2.10 from 2.08. We get this internal 
>>> error  
>>>
>>> [image: nirvana_–_ci2_build_nirvana_war_xml__nirvana_.jpg]
>>>
>>> Any idea how to further debug this? Our app works fine using SDM we just 
>>> get this error when compiling for deployment.
>>>
>>> Compiler options are:  -logLevel DEBUG -war ${webapp.dir} 
>>> com.ocs.nirvana.Encasa -XnoclassMetadata -XnocheckCasts 
>>> -generateJsInteropExports -style ${compile.style} -strict -optimize 7
>>> -- 
>>> 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-tool...@googlegroups.com.
>>> To view this discussion on the web visit 
>>> https://groups.google.com/d/msgid/google-web-toolkit/b9d05c7f-d9eb-465f-8b70-e84627b455c0n%40googlegroups.com
>>>  
>>> <https://groups.google.com/d/msgid/google-web-toolkit/b9d05c7f-d9eb-465f-8b70-e84627b455c0n%40googlegroups.com?utm_medium=email&utm_source=footer>
>>> .
>>>
>>>
>>>
>>>

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-web-toolkit/3f7d6eb2-8191-45cc-aad0-b809a738f120n%40googlegroups.com.


Re: Issue with migrating to GWT 2.10

2023-01-19 Thread Paul Stockley
I tried reducing the optimization level to 0, no difference. This has been 
a problem in the past. I need to turn on more debug info. I tried logLevel 
at ALL but it didn't really output anything new.

On Thursday, January 19, 2023 at 4:05:22 PM UTC-5 Michael Joyner wrote:

> Meh... I just saw the compile options below the empty pic.
>
>
> On 1/19/23 16:04, Michael Conrad wrote:
>
> a) Have you tried increasing heap space?
> b) Are you compiling production in STRICT mode? (Strongly recommended.)
> c) Are you running SDM in STRICT compile mode? (Strongly recommended.)
>
> On 1/19/23 14:43, Paul Stockley wrote:
>
> We are trying to migrate to GWT 2.10 from 2.08. We get this internal 
> error  
>
> [image: nirvana_–_ci2_build_nirvana_war_xml__nirvana_.jpg]
>
> Any idea how to further debug this? Our app works fine using SDM we just 
> get this error when compiling for deployment.
>
> Compiler options are:  -logLevel DEBUG -war ${webapp.dir} 
> com.ocs.nirvana.Encasa -XnoclassMetadata -XnocheckCasts 
> -generateJsInteropExports -style ${compile.style} -strict -optimize 7
> -- 
> 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-tool...@googlegroups.com.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/google-web-toolkit/b9d05c7f-d9eb-465f-8b70-e84627b455c0n%40googlegroups.com
>  
> <https://groups.google.com/d/msgid/google-web-toolkit/b9d05c7f-d9eb-465f-8b70-e84627b455c0n%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>
>
>
>

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-web-toolkit/9565d101-c1fd-4e04-88d6-82880626455bn%40googlegroups.com.


Where to get HEAD-SNAPSHOT builds from

2019-11-06 Thread Paul Stockley
Where can I download HEAD-SNAPSHOT builds from?

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-web-toolkit/405b5603-f21a-4632-8168-b2754f6a1e02%40googlegroups.com.


Re: Understanding JsInterop

2018-02-21 Thread Paul Stockley
Try using Js.uncheckedCast from jsinterop-base

On Tuesday, February 20, 2018 at 1:59:44 PM UTC-5, Scott Shumway wrote:
>
> I'm still unable to do this. I want to be able to get a DOMRect from a 
> com.google.gwt.dom.client.Element with JsInterop. If I cast to this Element 
> class, or even ((HasGetBoundingClientRect) (Object) element), I will get a 
> (runtime) java.lang.ClassCastException. The cast to Object works, of 
> course, it's the cast to HasGetBoundingClientRect.
>

-- 
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+unsubscr...@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.


Re: JsInterop Shared Model + REST API

2017-11-18 Thread Paul Stockley
gwt-interop-utils shows one way of doing it. This assumes you are OK using 
intermediate collection types.

https://github.com/GWTReact/gwt-interop-utils/blob/master/DOCUMENTATION.md



On Saturday, November 18, 2017 at 3:52:09 AM UTC-5, Chris L wrote:
>
> I'm trying to create a shared model in my GWT 2.8.2 application that I can 
> use both at the server and in GWT client code.
>
> My research/Google Fu tells me that this might be possible with JsInterop 
> but since I'm new to JsInterop I'm just not sure.
> I've done some experiments but I've run into a couple of issues with the 
> biggest being that I can't have my model accessor methods if I make the 
> model native.  The compiler tells me that they have to be native or 
> abstract.
>
> What I'd like to do with my model is:
> @JsType
> public class User {
> private double id;
> private String code;
> private String name;
>
> @JsConstructor
> public User() {
> }
>
> @JsIgnore
> public User(double id, String code, String name) {
> this();
>
> this.id = id;
> this.code = code;
> this.name = name;
> }
>
> ...
> @JsProperty
> public double getId() {
> return id;
> }
>
> @JsProperty
> public double setId(double id) {
> this.id = id;
> }
> ...
> }
>
> Then in my GWT application I'd like to do this:
>
> public class JsTypes {
>
> public static native  T getJsTypeObject(JavaScriptObject 
> result)/*-{
> return result;
> }-*/;
> }
>
> //called after REST response from server
> private void onCallback(String json) {
> Console.log("JSON:" + json);
> JavaScriptObject result = JsonUtils.safeEval(json);
> User user = JsTypes.getJsTypeObject(result);
> ...
> //do something with user
>}
>
> Any ideas or suggestions would be greatly appreciated.
>

-- 
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+unsubscr...@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.


Re: GWTReact Release and Roadmap

2017-05-01 Thread Paul Stockley
Yes, I think you would need a good immutable collection library to make 
Redux work well from Java. In our application we are just using React 
State. This works fine because we are replacing relatively small isolated 
parts of our application currently (1 or 2 connected screens at the most). 
Even Facebook uses this approach for large parts of their application. If 
you were building a complete application or replacing a major module, it 
may be better to look at a state manager. I think either Redux or MobX 
would work or you could roll your own in Java.  



On Monday, May 1, 2017 at 1:02:32 PM UTC-4, Ivan Markov wrote:
>
> Side question: I can imagine that the lack of object spread probably makes 
> Redux a bit annoying to use from Java. Yet, if you are not using neither 
> Redux nor MobX, how are you managing your state?
>
>
> On Monday, May 1, 2017 at 3:48:51 PM UTC+3, Paul Stockley wrote:
>>
>> I agree both Redux and MobX are both pretty stable. The decision was more 
>> a reflection on the current state of the GTWReact projects. I would say 
>> both are really proof of concepts at this stage. Redux in particular would 
>> really need interfaces building to the common middleware to be really 
>> useful.
>>
>> On Sunday, April 30, 2017 at 11:05:08 AM UTC-4, Mark Erikson wrote:
>>>
>>> For what it's worth, as a Redux maintainer I can assure you that Redux 
>>> is very stable and not going to meaningfully change (at least at the API 
>>> level) from here on out :)
>>>
>>> On Sunday, April 30, 2017 at 8:27:10 AM UTC-4, Paul Stockley wrote:
>>>>
>>>> I have just released a new version of the GWTReact 
>>>> <https://github.com/GWTReact> projects to support GWT 2.8.1
>>>>
>>>> As of this release, I will no longer be maintaining the MobX and Redux 
>>>> projects. Our company is not using them currently and I don't have the 
>>>> time 
>>>> to keep them updated. In the future, we may update MobX if we start using 
>>>> it in production. If you would like take over maintenance of either of 
>>>> these projects please let me know.
>>>>
>>>> *Road Map*
>>>>
>>>> With the current release, I feel pretty good about the quality of the 
>>>> projects. We are starting to use both gwt-interop-utils and gwt-react in 
>>>> our production code with excellent results. However, I think to get to a 
>>>> 1.0 release I need to make the following changes:
>>>>
>>>>
>>>>1. Migrate gwt-interop-utils to use the new GWT base project
>>>>2. Migrate gwt-react to use elemental 2
>>>>
>>>> I will start working on these objectives in a month or two. The main 
>>>> determining factor on how quick this happens will be how fast elemental 2 
>>>> matures.
>>>>
>>>>

-- 
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+unsubscr...@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.


Re: GWTReact Release and Roadmap

2017-05-01 Thread Paul Stockley
I agree both Redux and MobX are both pretty stable. The decision was more a 
reflection on the current state of the GTWReact projects. I would say both 
are really proof of concepts at this stage. Redux in particular would 
really need interfaces building to the common middleware to be really 
useful.

On Sunday, April 30, 2017 at 11:05:08 AM UTC-4, Mark Erikson wrote:
>
> For what it's worth, as a Redux maintainer I can assure you that Redux is 
> very stable and not going to meaningfully change (at least at the API 
> level) from here on out :)
>
> On Sunday, April 30, 2017 at 8:27:10 AM UTC-4, Paul Stockley wrote:
>>
>> I have just released a new version of the GWTReact 
>> <https://github.com/GWTReact> projects to support GWT 2.8.1
>>
>> As of this release, I will no longer be maintaining the MobX and Redux 
>> projects. Our company is not using them currently and I don't have the time 
>> to keep them updated. In the future, we may update MobX if we start using 
>> it in production. If you would like take over maintenance of either of 
>> these projects please let me know.
>>
>> *Road Map*
>>
>> With the current release, I feel pretty good about the quality of the 
>> projects. We are starting to use both gwt-interop-utils and gwt-react in 
>> our production code with excellent results. However, I think to get to a 
>> 1.0 release I need to make the following changes:
>>
>>
>>1. Migrate gwt-interop-utils to use the new GWT base project
>>2. Migrate gwt-react to use elemental 2
>>
>> I will start working on these objectives in a month or two. The main 
>> determining factor on how quick this happens will be how fast elemental 2 
>> matures.
>>
>>

-- 
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+unsubscr...@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.


GWTReact Release and Roadmap

2017-04-30 Thread Paul Stockley
I have just released a new version of the GWTReact 
 projects to support GWT 2.8.1

As of this release, I will no longer be maintaining the MobX and Redux 
projects. Our company is not using them currently and I don't have the time 
to keep them updated. In the future, we may update MobX if we start using 
it in production. If you would like take over maintenance of either of 
these projects please let me know.

*Road Map*

With the current release, I feel pretty good about the quality of the 
projects. We are starting to use both gwt-interop-utils and gwt-react in 
our production code with excellent results. However, I think to get to a 
1.0 release I need to make the following changes:


   1. Migrate gwt-interop-utils to use the new GWT base project
   2. Migrate gwt-react to use elemental 2

I will start working on these objectives in a month or two. The main 
determining factor on how quick this happens will be how fast elemental 2 
matures.

-- 
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+unsubscr...@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.


Re: GWT React - Update

2017-04-13 Thread Paul Stockley
You can't use uibinder to define your react components.  You can use React 
to implement a GWT widget so you get the benefit of the virtual dom. You 
can also embed top level React components within ui binder files. Take a 
look at this sample 
https://github.com/GWTReact/gwt-react-examples/tree/master/src/gwt/react/widget_interop
 . 
I will put together a post sometime on how we are integrating React into 
our existing GWT codebase.


On Thursday, April 13, 2017 at 2:52:28 AM UTC-4, sameep singhania wrote:
>
> Can I use ui binder with gwt-react?
> Can I also use my widgets inside react elements, so that I can harness the 
> virtual DOM power even for GWT Widgets?
>
>
> On Thursday, 7 April 2016 19:05:50 UTC+5:30, Paul Stockley wrote:
>>
>> I have managed to get Redux working. I implemented the following examples 
>>
>> http://redux.js.org/docs/introduction/Examples.html#counter
>> http://redux.js.org/docs/introduction/Examples.html#todos-with-undo
>>
>> You can see the code on my google drive below:
>>
>>
>> https://drive.google.com/folderview?id=0Bxp8vLBG2ol3ZERCc3lHUEhKU2M&usp=sharing
>>
>> I also updated the todomvc example based on my new more refined API.
>>
>> I am just creating a sample to exercise most of the React API. I also 
>> need to prove out inter-op with existing GWT widgets and also test with a 
>> production build. At the moment it only works on the latest snapshot build 
>> of GWT2.8. Hopefully a RC candidate will be out by the time I finish.
>>
>> When this is done I will publish a preview version of GWT React. I would 
>> like to get some feedback before I turn it into an official project on 
>> Github.
>>
>

-- 
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+unsubscr...@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.


Re: Compilation of a large GWT application?

2017-04-12 Thread Paul Stockley
For development purposes you could try the following in your .gwt.xml file





You many or may not be able to get away with the first setting depending on 
how you structured your css. In our project we tried to minimize the amount 
of code generation. We have about 250 uibinder files and 300,000 lines of 
code. For client bundles, we have very significant sharing of CSS by 
composing multiple standard CSS classes e.g. 




addStyleNames="{ocs.css.btnBlueWithCursor} {ocs.css.marginLeft2u}"


Our RPC is built on a custom code generator that generates JSO based classes 
from java command / data objects. The nice thing about this approach is the 
code size is very small and

we only rely on the browser JSON serialization so it is very fast. The downside 
is that you can't share logic on the client/server.

However, we are looking at migrating to JsInterop which will allow code sharing 
as well.


The end result is that our app takes about 80 seconds to do a cold compile for 
1 permutation and about 2/3 seconds on a typical SDM refresh. 

The obfuscated size of minified bundle is 2.6 MB uncompressed and around 1MB 
gzipped.





On Wednesday, April 12, 2017 at 9:20:44 AM UTC-4, Marcin Okraszewski wrote:
>
> It turns out, AutoBeans generate 250k lines of code! This is compared to 
> 550k written by us. But this is still just a tip of an iceberg. When we dig 
> further into code generation output, it turns out we have overall 1.5 M 
> lines of code generated, so 3x more than we have written! It is mostly 
> attributed to UiBinder (over 800k lines), client bundles (200k) and 
> mentioned auto beans (250k). Thanks for hint for hint with RPC - that 
> pushed us in right direction. 
>
> Does any one have idea what to do with UiBinders? Or still some other 
> ideas what to try?
>
> Thanks,
> Marcin
>
>
> On Tuesday, 11 April 2017 17:31:43 UTC+2, Marcin Okraszewski wrote:
>>
>> Good hint. In our case we don't use GWT-RPC, but AutoBeans for REST. 
>> Though looking into compile report, it seems it wasn't best choice either, 
>> as it seems to generate a lot of code too :-( Will need to look after a 
>> replacement. JsInterop would be best here ... I wish it supported 
>> collections... 
>>
>> Thanks!
>> Marcin
>>
>>
>> On Tuesday, 11 April 2017 17:19:53 UTC+2, Juan Pablo Gardella wrote:
>>>
>>> Also check the classes that are used by GWT-RPC. For example if those 
>>> classes are using List instead of ArrayList for example, will generate more 
>>> JS output.
>>>
>>> On Tue, 11 Apr 2017 at 12:13 Jens  wrote:
>>>

 Our optimized output with collapse all is 23 MB. Things are reused 
> though, which is visible in left-over taking 6 MB. 
>

 How large is a single permutation (= not using collapse-all)? Our app 
 is roughly 300KLOC and results in roughly 6-7MB optimized JS for a single 
 permutation when doing a production build. In total we generate 3 
 permutations (Firefox, IE, Chrome). However we use SuperDevMode / GWT 
 compiler with just 4GB Heap space configured for the JVM. Seems weird that 
 you need 16GB for a build that probably isn't that different.

 Libraries are kind of standard I guess: GWT-RPC, UiBinder, Google GIN, 
 a 3rd party JS lib for graphs. 

 Maybe your issue is some 3rd party generator that simply consumes way 
 to much memory and should be fixed / optimized? Have you run SDM / GWT 
 Compiler in debug mode and attached a debugger to it so you can make a 
 heap 
 dump once heap is quite high to see who is consuming all the memory?

 -- J.

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

>>>

-- 
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+unsubscr...@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.


Can't put breakpoints on specific lines in chrome

2017-04-12 Thread Paul Stockley
When debugging SDM in chrome there are many lines you can't put breakpoints 
on even though the line number indicates you can. 




For example, you can't put a breakpoint on lines 373 and 377. Do you think 
this a chrome issue or a problem with the source maps?

-- 
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+unsubscr...@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.


Slow debugging with SDM

2017-04-10 Thread Paul Stockley
Is anyone else having serious performance problems when stepping through 
SDM code in chrome? The issue happens in cases where this is mapped to the 
window object and chrome want to expand all the globals in the inspection 
window.

There is a chrome issue logged 
https://bugs.chromium.org/p/chromium/issues/detail?id=463451&q=component%3APlatform%3EDevTools%3EJavaScript%20&colspec=ID%20Pri%20M%20Stars%20ReleaseBlock%20Component%20Status%20Owner%20Summary%20OS%20Modified&start=100

Maybe we should all star the issue.

-- 
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+unsubscr...@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.


Re: Starting new GWT project - what to use

2017-03-27 Thread Paul Stockley
I would seriously look into using some kind of Virtual DOM based library 
e.g. React, Preact or Vue. I have been using react for over a year both in 
Java and Javascript and I never want to go back to the old imperative 
approach. Even complex UI code is now relatively easy to comprehend. I made 
GWTReact so we could integrate React into our existing code base. However, 
it would be a good choice for a new project if you want to stick with GWT. 
Once elemental 2 is released I can remove any dependency on the old GWT 
code base.

I also use javascript + flow types for some of our newer projects. This 
works pretty well in intellij with the flow plugin. I don't mind either 
approach. 

On Monday, March 27, 2017 at 12:55:27 AM UTC-4, Bryan Buchanan wrote:
>
> Hi,
>
> I've been a long time GWT user, and my current apps use gwtbootstrap, UI 
> Binder, widgets, GWT-RPC. i.e. most of the stuff that, IMO, makes GWT worth 
> using.
>
> From the stuff I've seen about the 3.x release, a lot of this disappears. 
> I'm wondering if there's any document anywhere which sets out "best 
> practice" for any new GWT deleopment (or indeed, would you even use GWT ?).
>
> Thanks.
>

-- 
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+unsubscr...@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.


New release of GWTReact

2017-03-18 Thread Paul Stockley
I have just pushed new versions of the GWTReact 
 projects to maven central. 

This release contains some significant breaking changes. In collaboration 
with Ivan Markov, I have refactored the API to support ES6 style stateful 
components. This is a more future proof API than the React.createClass() 
approach. In addition, this is a much more natural API to use from Java.

As an added benefit, this change in approach now allows the same API to 
support https://preactjs.com/. This is super small and fast alternative to 
React that is ideal for mobile or if you want to add some react components 
to an existing project with minimal overhead. The Gzip size of this library 
is less than 10kb.

-- 
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+unsubscr...@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.


GWTReact release

2016-10-28 Thread Paul Stockley
I have pushed new versions of the GWTReact  
projects to support the final release of GWT2.8

The versions of the individual JS projects they depend on have also been 
updated as follows:

react 15.3.2,
react-dom 15.3.2
redux 3.5.2,
react-redux 4.4.5
redux-undo 1.0.0-beta
react-router 2.4.1
mobx 2.5.2
mobx-react 3.5.6
mobx-react-devtools 4.2.6

-- 
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+unsubscr...@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.


Re: jsinterop @JsFunction: How to get this (context)?

2016-10-11 Thread Paul Stockley
Sorry, I read it again after I posted and realized it was the opposite 
problem. I am not sure if there is a better way. I will have to experiment.


On Tuesday, October 11, 2016 at 9:14:57 AM UTC-4, Vassilis Virvilis wrote:
>
> That's the opposite problem (also present in D3 though) where you have a 
> js callback and you want to map it to a java functoid.
>
> The problem at hand is about mapping a java functoid.to a js callback 
> (done via @JsFunction) and also get access to the already bound __this__ 
> variable.
>
> So my implementation based on a suggestion from Stepan Koltsov was to 
> wrap the native js callback. I understand that it used JSNI and 
> JavaScriptObject that are destined to deprecation but I didn't see any 
> other way.
>
> Of course it would be great if you come with a better approach...
>
> Vassilis
>
>
> On Tue, Oct 11, 2016 at 4:03 PM, Paul Stockley  > wrote:
>
>> It should be possible to write a helper that uses the javascript bind 
>> command so that you can bind this for any functional interface. I will have 
>> a play and see if I can get something working.
>>
>>>
>>> -- 
>> 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+unsubscr...@googlegroups.com .
>> To post to this group, send email to google-we...@googlegroups.com 
>> .
>> Visit this group at https://groups.google.com/group/google-web-toolkit.
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>
>
> -- 
> Vassilis Virvilis
>

-- 
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+unsubscr...@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.


Re: jsinterop @JsFunction: How to get this (context)?

2016-10-11 Thread Paul Stockley
It should be possible to write a helper that uses the javascript bind 
command so that you can bind this for any functional interface. I will have 
a play and see if I can get something working.

>
>

-- 
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+unsubscr...@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.


Re: JsInterop and constants

2016-09-27 Thread Paul Stockley
It can't be a child interface.

On Tuesday, September 27, 2016 at 9:52:47 AM UTC-4, Kirill Prazdnikov wrote:
>
> > or you can move your constants to another class since they are not js 
> visibile...
>
> Thats what am I doing:
>
> @JsType(isNative = true, namespace = JsPackage.GLOBAL)
> public interface JsObject {
>   @JsProperty int getMyInt();
>
>   interface Const {
> int ONE = 1;
>   }
> }
>
>

-- 
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+unsubscr...@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.


Re: [GWT 2.8 SHNAPSHOT] missing stack trace for 'Should only call onDetach when the widget is attached to the browser's document'

2016-09-27 Thread Paul Stockley
Is this in a production build or SDM? In SDM you can pass the 
flag -XmethodNameDisplayMode ABBREVIATED. Then in chrome you will see 
class/method names in the call stack

On Monday, September 26, 2016 at 5:24:25 PM UTC-4, Hristo Stoyanov wrote:
>
> Hi all,
> I wonder if anyone can help me figure out what is causing this - I am 
> getting* java.lang.IllegalStateException: Should only call onDetach when 
> the widget is attached to the browser's document* *. *See below. I 
> suspect this is a GWT exception of some kind, but the stack trace is 
> obfuscated and I can not figure out where the problem is. I tried 
> installing my exception handler with no success - the stack trace is still 
> useless:
>
>  Console.log("Exception logger INSTALLED!!!");
> GWT.setUncaughtExceptionHandler(e -> {
> GWT.log("Unhandled exception", e);
>  });
>
> This is happening with Errai 4 SNAPSHOT randomly, but if I figure out the 
> stack trace I can get better understanding of what is going on. How do I 
> get the stack trace ? How do I verify that the gwt Code server has all 
> source maps it needs???
>
> Thanks
>
>
> 
>
> Current content widget vanished or changed. Not delivering pageHiding 
> event to HomePage.
> ErraiConsoleLogHandler.java:87 14:11:26 WARNING 
> [DefaultNavigatingContainer] Got invalid page name "AboutPage". Redirecting 
> to default page.
> ErraiConsoleLogHandler.java:87* java.lang.IllegalStateException: Should 
> only call onDetach when the widget is attached to the browser's document*
> at Unknown.nC_g$(myApp-0.js@8:16163)
> at Unknown.TC_g$(myApp-0.js@9:16405)
> at Unknown._C_g$(myApp-0.js@9:16452)
> at Unknown.kLf_g$(myApp-0.js@9:47908)
> at Unknown.WBe_g$(myApp-0.js@18:37314)
> at Unknown.aCe_g$(myApp-0.js@14:37371)
> at Unknown.nCe_g$(myApp-0.js@14:37481)
> at Unknown.ZPj_g$(myApp-0.js@8:114529)
> at Unknown.ZBe_g$(myApp-0.js@36:37344)
> at Unknown.WPj_g$(myApp-0.js@16:114507)
> at Unknown.aOj_g$(myApp-0.js@17:113981)
> at Unknown.iAi_g$(myApp-0.js@3:88783)
> at Unknown.jAi_g$(myApp-0.js@15:88755)
> at Unknown.y2i_g$(myApp-0.js@32:98783)
> at Unknown.A2i_g$(myApp-0.js@17:98822)
> at Unknown.c6i_g$(myApp-0.js@45:99823)
> at Unknown._5i_g$(myApp-0.js@10:99802)
> at Unknown.KAi_g$(myApp-0.js@32:88955)
> at Unknown.L6i_g$(myApp-0.js@16:100106)
> at Unknown.B7i_g$(myApp-0.js@54:100343)
> at Unknown.AJj_g$(myApp-0.js@225:112594)
> at Unknown.PDj_g$(myApp-0.js@30:110774)
> at Unknown.QDj_g$(myApp-0.js@8:110787)
> at Unknown.SDj_g$(myApp-0.js@8:110800)
> at Unknown.FDj_g$(myApp-0.js@10:110638)
> at Unknown.Sii_g$(myApp-0.js@261:83179)
> at Unknown.lambda_0_g$(myApp-0.js@27:96)
>

-- 
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+unsubscr...@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.


Re: [GWT 2.8 SHNAPSHOT] missing stack trace for 'Should only call onDetach when the widget is attached to the browser's document'

2016-09-27 Thread Paul Stockley
Sorry, I should also add if this is production, you can generate a symbol 
map file. Usually on my builds it is located under web-inf/deploy//.symbolMap. You can search for the obfuscated function 
names e.g. nC_g$  You can also do this lookup at run-time. I would have to 
dig up the code because I can't remember the GWT class you use.

-- 
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+unsubscr...@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.


Re: Very slow debugging form IDEA

2016-09-23 Thread Paul Stockley
A lot of people outside of the GWT community are also complaining that 
debugging in Chrome is really slow these days. 

On Friday, September 23, 2016 at 4:54:15 AM UTC-4, Jens wrote:
>
> Oh and we don't use Java8 yet. We use a GWT version somewhere between 2.7 
> and 2.8beta1. 
>
> I think the issue is more Chrome related.
>

-- 
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+unsubscr...@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.


Re: Is GWT is Dead?

2016-09-07 Thread Paul Stockley
I think you are getting confused with Goggle Wave.

On Wednesday, September 7, 2016 at 5:07:41 AM UTC+1, Gourab wrote:
>
> >> ok then gmail being written in GWT is urban myth.
>
> It was rewritten in GWT and later reverted back to it's original 
> implementation. 
>
> On Wed, Sep 7, 2016 at 1:36 AM, Vassilis Virvilis  > wrote:
>
>> ok then gmail being written in GWT is urban myth.
>>
>> However looks like google group is written in GWT 
>> https://groups.google.com/forum/#!msg/google-web-toolkit/Mjjk5y9RQbw/hCWzIrZ1vzcJ
>>
>> On Tue, Sep 6, 2016 at 10:38 PM, Alain Ekambi > > wrote:
>>
>>> Gmail was created waaayyy before GWT was created.
>>>
>>> On 6 September 2016 at 21:31, Vassilis Virvilis >> > wrote:
>>>
 About 1) Isn't gmail written in GWT? I think I have read it somewhere...

 About 7) There is GWTcon2016 http://www.gwtcon.org/

 GWT doesn't look dead to me - but your questions have valid points.

Vassilis

 On Tue, Sep 6, 2016 at 2:38 PM, Ali Jalal >>> > wrote:

> Hi,
>
> I think GWT is not dead, but its development rate is decreased. I 
> think that last public product of Google which written in GWT was 
> Inbox 
>  
> which announced in late 2014. But AdWords 
> 
>  
> (one of main GWT applications in Google) were re-written by Dart and 
> AngularJS (which announced in March 2016).
>
> There are some good points about GWT which mentioned in this post 
>  
> and some pretty works about 2.8-RC2 release, JsInterop, GWTPolymer, 
> GWTMaterial, Angular2Boot, ...
>
> But there are some vague points about GWT:
>
> 1. Which projects in Google written based on GWT in 2015-2016?
> 2. Were there any change in steering committee 
>  members (companies) in last 
> two years?
> 3. New GWT compiler (J2CL) when will be released? Is its development 
> started yet?
> 4. Why there is no official Java (GWT) version of Angular2 
>  (while there are 
> JS, TypeScript & Dart versions)?
> 5. How many people in Google work in GWT team (compared to Dart & 
> AngularJs teams)?
> 6. What is other companies roadmap about investment & development 
> based on GWT (like Vaadin, Sencha, ...)?
> 7. Is there any planned GWT Con or GWT Create conferences?
>
> I'm developing various applications with GWT for about 8 years and I 
> really enjoy it. It seems GWT development rate is not good enough 
> compared 
> to other Google or Web tools and it makes me worried about its future.
>
> Is that correct?
>
> Regards.
>
>
> On Tue, Sep 6, 2016 at 10:26 AM, Ignacio Baca Moreno-Torres <
> ign...@bacamt.com > wrote:
>
>> Just curious, what and why are you waiting GWT 3? GWT is pretty 
>> awesome right now…
>>
>> On Tue, Sep 6, 2016 at 8:39 AM Ahamed > > wrote:
>>
>>> Team,
>>>   My Apologies for asking this question again.
>>>
>>> Is GWT is Dead or Alive ? From past 2 years i am waiting for GWT 3.0 
>>> but still is not released? Can any one from Steering committee explain 
>>> whats going on or Any progress on GWT 3.0 .   
>>>
>>> -- 
>>> 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+unsubscr...@googlegroups.com 
>>> .
>>> To post to this group, send email to google-we...@googlegroups.com 
>>> .
>>> Visit this group at 
>>> https://groups.google.com/group/google-web-toolkit.
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>> -- 
>> 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+unsubscr...@googlegroups.com 
>> .
>> To post to this group, send email to google-we...@googlegroups.com 
>> .
>> Visit this group at 
>> https://groups.google.com/group/google-web-toolkit.
>> For more options, visit https://groups.google.com/d/optout.
>>
>
> -- 
> 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+unsubscr...@googlegroups.com 
> .
> To post to this group, send email to google-we...@googlegroups.com 
> .
> Visit this group at https://groups.google.com/gro

Re: Best Practice for JSON object recreation on client

2016-08-18 Thread Paul Stockley
I wrote a set of utilities using the new JsInterop capability in 2.8 that 
provides one way of handling JSON. Take a look at the documentation 
here https://github.com/GWTReact/gwt-interop-utils/blob/master/DOCUMENTATION.md

We use Jackson on the server for handling the translation from JSON to Java 
objects

On Thursday, August 18, 2016 at 5:35:34 AM UTC-4, Jens wrote:
>
>
> Why would it? You may want to use JsInterop to call JSON.parse() instead 
>> of using JsonUtils and casts from JavaScriptObject, but I believe it'd just 
>> work otherwise (can't try it ATM though)
>
>
> You can not use a Java Collection as field so you would need some 
> conversion to JsArray that JsInterop / JSON.parse() can handle but 
> otherwise it should work well.
>
> -- J.
>

-- 
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+unsubscr...@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.


Re: working in beta but not in latest git

2016-08-09 Thread Paul Stockley
Your assumption is true for Boolean and Double but not the other boxed 
types.

On Tuesday, August 9, 2016 at 10:39:53 AM UTC-4, Vassilis Virvilis wrote:
>
> From my understanding (which is not much) the whole point is moot. Looks 
> like java Boxed types (Boolean, Double, Integer) are mapped directly to JS 
> primitives so the need for the above code is gone. Is that right?
>
> If yes and just for the shake of syntax curiosity: what is the correct 
> syntax to invoke the booleanValue() of a Boolean object?
>
> Thanks for helping me clearing this up.
>
> On Tue, Aug 9, 2016 at 5:33 PM, Jens > 
> wrote:
>
>>
>> https://github.com/gwtproject/gwt/issues/9356 suggests that
>>>value.@Boolean::booleanValue() is rejected but 
>>> value@Boolean::booleanValue()() works?
>>>
>>
>> Yes but they are two different things. The first syntax returns the JS 
>> function itself (method reference) while the second one executes the 
>> function and returns its return value. So you have changed the code from 
>> "Does the function exist on 'value'" to "execute the function (=> and throw 
>> a JS error if it does not exist)". 
>>
>> Method references are forbidden for Double, Boolean and String. Method 
>> calls are allowed.
>>
>> -- J. 
>>
>> -- 
>> 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+unsubscr...@googlegroups.com .
>> To post to this group, send email to google-we...@googlegroups.com 
>> .
>> Visit this group at https://groups.google.com/group/google-web-toolkit.
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>
>
> -- 
> Vassilis Virvilis
>

-- 
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+unsubscr...@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.


Re: Ui Binder Alternatives

2016-07-26 Thread Paul Stockley
I think there is a good chance that Widgets / UiBinder in some form could 
get ported to GWT 3.0. Probably not by google and probably in separate 
projects from the main GWT compiler stack.

On Monday, July 25, 2016 at 7:58:50 PM UTC-4, Gilberto wrote:
>
> Nobody really knows how GWT 3 will be for sure, but I assume GWT 3.0 will 
> be less of a framework and more of a transpiler from Java to Javascript, 
> which other frameworks will be built on top of it.
>
> So I wouldn't expect a simple template engine to replace UiBinder, but 
> full featured frameworks. You'll have to choose one or implement your own.
>
> But that's for 3.0.
>
> Meanwhile, I see Errai as a very good option, since you can use the HTML 
> template right from your designers, with minimal-to-none modifications to 
> link with your logic code. That's something pretty hard to achieve with 
> UiBinder.
>

-- 
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+unsubscr...@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.


Re: Ui Binder Alternatives

2016-07-25 Thread Paul Stockley
One option when 2.8 is released would be to use GWT React (
https://github.com/GWTReact/gwt-react). React is a good substitute for the 
view layer and can be integrated with existing widgets so you can migrate 
your way to a UiBinderless approach.

On Saturday, July 23, 2016 at 9:40:02 PM UTC-4, N Troncoso wrote:
>
> With GWT 3.0, Widgets and UI Binder is losing support. Even besides that, 
> I'm not a huge fan of UI Binder. I'd really just prefer to use vanilla 
> HTML. With that said, I've been searching for other options and I've only 
> found that alternatives are very limited. Even more so, examples of how to 
> integrate alternatives into GWT are basically non-existent. So, my question 
> is, what can I use instead of Widgets and UI Binder and where can I find 
> examples/tutorials/documentation on how to use them in GWT.
>
> I found Errai  as one option. But, this seems 
> to be an entire framework, rather than just a template system.
>
> Any insight would be greatly appreciated. Thanks
>

-- 
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+unsubscr...@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.


Re: Are GWT widgets "heavy" ?

2016-07-05 Thread Paul Stockley
If you make any calls that retrieve the size of an element then this will 
cause a re-flow even within a javascript block.

On Tuesday, July 5, 2016 at 12:36:38 PM UTC-4, fenyoapa wrote:
>
> "*This causes the browser to recalculate and repaint the page each time 
>> you append a single search item to the DOM*"
>
>
>
> I think this is true only if he uses some async method that allow the 
> browser to repaint. If not, then the repaint occures only once, when the 
> search results loop finished
>
> 2016. július 5., kedd 17:53:26 UTC+2 időpontban Jens a következőt írta:
>>
>> I wouldn't call them heavy but I would not use a widget in cases I don't 
>> need events, e.g. taking a UiBinder example:
>>
>> 
>>   
>> 
>>click me 1
>>click me 2
>> 
>> 
>>click me 1
>>click me 2
>> 
>>   
>> 
>>
>> In the above you are only interested in events for your labels and all 
>> the FlowPanels do not provide real value. IF you are familiar with HTML and 
>> CSS then you could use
>>
>> 
>>   
>> 
>>click me 1
>>click me 2
>> 
>> 
>>click me 1
>>click me 2
>> 
>>   
>> 
>>
>> The above uses less DOM operations to build the UI and needs less memory 
>> because there are fewer JavaScript objects pointing to DOM elements (= less 
>> GWT widgets).
>>
>> Some side notes: 
>>
>>- When you build a large list of widgets as in your search result, 
>>then do not append all the search result entries to a container in a 
>>for-loop if that container is already attached to the DOM. This causes 
>> the 
>>browser to recalculate and repaint the page each time you append a single 
>>search item to the DOM. Instead detach the container, fill it with the 
>>search results and then attach it again (or create a new container and 
>>replace the old one).
>>- Use pagination
>>- If you can't use pagination for any reason, consider only render 
>>the items that are visible. If you have 1000 search results but only 20 
>> are 
>>visible in the scroll panel, then only render 40 or so and render 
>>additional entries when the user scrolls to them.
>>- Only show the top 20 search results and add a "show more" button or 
>>let users redefine their search until their desired result is in the top 
>> 20.
>>
>>
>> Basically if your list is so long that it starts to get slow then you 
>> most likely have a general usability/UI problem because nobody will scroll 
>> through such long lists anyways.
>>
>> -- J.
>>
>

-- 
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+unsubscr...@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.


gwt-interop-utils release on Maven Central

2016-06-18 Thread Paul Stockley
I have pushed an initial version of gwt-interop-utils to Maven Central. 
Thanks for everyone's feedback. I have incorporated what I think makes 
sense. The documentation has been updated to reflect the changes.

I am sure the library will evolve as GWT2.8 gets closer to release and we 
see what elemental 2 brings.

I have updated all of the GWTReact projects to use gwt-interop-utils and 
pushed new versions to Maven Central.

My focus now is to make React and MobX production ready.

https://github.com/GWTReact/gwt-interop-utils

-- 
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+unsubscr...@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.


Re: JsInterop and Java collections?

2016-06-09 Thread Paul Stockley
As Thomas says, it will be impossible to support passing any of the 
collection interfaces directly through to JS code. You might think however, 
that you could change the implementation of ArrayList to actually be a JS 
Array. I don't think this is possible either because an instance of 
ArrayList needs to fulfill the Java contract of being able to know which 
interfaces it implements. This is done by having special meta data attached 
to the object prototype. The minute you start touching the Array prototype 
you have the potential of incompatibility with existing JS code.

Having said that, it is totally possible to implement an adapter to make a 
JS array look like a List. Below is a very hacky way to do it (the example 
uses the Array JsNative interface I defined but you could do the same with 
JsArray)

*native * List asList(Array a) */*-{
**l** = @java.util.ArrayList::new()()
**l...@java.util.ArrayList::array ** = a;
return **l**;
}-*/*;

Array jsArray = Array.*create*();

jsArray.push(*"val1"*);
jsArray.push(*"val2"*);

List lArray = asList(jsArray);


//Any changes to lArray will reflect in jsArray and vice versa


lArray.add(*"val3"*);
jsArray.push(*"val4"*);


I strongly do not recommend using  the above approach. A better way would be to 
create an adapter class that takes the native Array to wrap in the constructor 
and implements the List methods. I have implemented this in my library.

-- 
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+unsubscr...@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.


Re: JsInterop and Java collections?

2016-06-09 Thread Paul Stockley
As Thomas, says it will be impossible to support passing any of the 
collection interfaces directly through to JS code. You might think however, 
that you could change the implementation of ArrayList to actually be a JS 
Array. I don't think this is possible because an instance ArrayList needs 
to fulfill the Java contract of being able to know which interfaces it 
implements. This is done by having special meta data attached to the object 
prototype. The minute you start touching the Array prototype you have the 
potential of incompatibility with existing JS code.

Having said that, it is totally possible to have a native JS array Interop 
interface provide an adapter to make it look like a List. Below is a very 
hacky way to do it using the Array interface I defined.

*private native * List asList(Array a) */*-{
**l** = @java.util.ArrayList::new()()
**l...@java.util.ArrayList::array ** = a;
return **l**;
}-*/*;

Array jsArray = Array.*create*();

jsArray.push(*"val1"*);
jsArray.push(*"val2"*);

List lArray = asList(jsArray);



lArray.add(*"val3"*);
jsArray.push(*"val4"*);

-- 
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+unsubscr...@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.


Re: gwt-inerop-utils preview

2016-06-03 Thread Paul Stockley
Jens,
I can see your point, about the usability when you get many arguments. 
Originally I was going to kind of mirror the Java JDK and not go more than 
2. Personally, I think it is a lot better to define custom interfaces when 
possible. To avoid having hundreds of class files I have started making 
them local to the API classes. I think this helps with readability.  

The case when the generic functions are useful is when you are prototyping 
a new API or porting some exsting javascript code. Hristo, what is an 
actual case where you need 4 or 5 parameters? 

-- 
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+unsubscr...@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.


Re: gwt-inerop-utils preview

2016-06-03 Thread Paul Stockley
Jens,

-- 
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+unsubscr...@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.


Re: gwt-inerop-utils preview

2016-06-02 Thread Paul Stockley
I will take a look at the putnami-gradle-plugin. I noticed Steffan's didn't 
seem to be supported. Thanks for the offer on migration. The projects are a 
bit in flux at the moment so probably better off not submitting a pull 
request until I have landed all the gwt-interop-utils changes.

-- 
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+unsubscr...@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.


Re: gwt-inerop-utils preview

2016-06-02 Thread Paul Stockley
I will add 4 and 5 arg interfaces. I think I can include something 
equivalent with your above code. I already have getters/setters and is 
defined functions for objects. All you would need to do is pass $wnd into 
these. Let me have a play around and see what I can come up with.

On Thursday, June 2, 2016 at 4:50:08 PM UTC-4, Hristo Stoyanov wrote:
>
> Thanks Paul,
> I was about to start releasing similar code 
> <https://github.com/hrstoyanov/gwt-functions/tree/master/src/main/java/org/gwtproject/functions/client>
> . 
> It does not make sense to do the same thing twice and obviously such 
> utility code is necessary. So, I will use your project as it seems a bit 
> more advanced and start contributing!
>
> Quick request before I adopt it in my libraries today:
> - Can you add functional interfaces with 4 and 5 arguments. I think you 
> have them up to 3 only, but I do face JS libraries with 4 and 5.
> - Do you have similar utils as the one below? If not, would it be possible 
> to incorporate something like it in your projects?
>
> /**
>  * JavaScript global variables and functions utils.
>  *
>  */
> //@JsType(isNative = true, namespace = JsPackage.GLOBAL)
> public abstract class VariablesAndFunctions {
>
> public native static  T eval(String expresion);
>
> //@JsOverlay
> //public boolean isJSVariableDefined(String jsVariableName) {
> //return Boolean.TRUE.equals(eval("!!window[" + jsVariableName + 
> "]"));
> //}
> //
> //@JsOverlay
> //public static  T getJSVariableValue(String jsVariableName) {
> //return eval("!!window[" + jsVariableName + "]");
> //}
> public static native String getStringJSVariable(String jsVar) /*-{
> return $wnd[jsVar].toString();
> }-*/;
>
> public static native Object getJSVariable(String jsVar) /*-{
> return $wnd[jsVar];
> }-*/;
> 
> public static native boolean isVariableDefined(String jsVar)/*-{
> return !!$wnd[jsVar];
> }-*/;
>
> public static native boolean isFunctionDefined(String functionName)/*-{
> return typeof functionName == 'function';
> }-*/;
> }
>
>
>
> On Thursday, June 2, 2016 at 11:57:46 AM UTC-7, Paul Stockley wrote:
>>
>> I have committed an initial version of gwt-interop-utils. 
>>
>> https://github.com/GWTReact/gwt-interop-utils
>>
>> This library provides some common utilities for working with JsInterop 
>> e.g.
>>
>> 1) Object Literal support
>> 2) Shared JSON compatible structures
>> 3) Common functional interfaces
>> 4) JSON utilities
>> 5) Low level Javascript utilities.
>>
>> One of my major goals was to enable creating complex object literals with 
>> arrays and maps that could be represented by a single class, accessible 
>> both on the client and server. You can now define a class such as
>>
>> import gwt.interop.utils.shared.collections.Array;
>> import gwt.interop.utils.shared.collections.StringMap;
>> import gwt.interop.utils.shared.valuetypes.NumberValue;
>>
>> @JsType(isNative = true, namespace = JsPackage.GLOBAL, name = "Object")
>> public class CommonDataObject {
>> public int intVal;
>> public double doubleVal;
>> public boolean booleanVal;
>> public String stringVal;
>> public NumberValue numberVal;
>> public Array anArray;
>> public StringMap aMap;
>> public CommonDataObject2 embeddedObj;
>>
>> @JsOverlay
>> public static CommonDataObject create() {
>> CommonDataObject o = new CommonDataObject();
>> o.intVal = 10;
>> o.doubleVal = 20.20;
>> o.booleanVal = true;
>> o.stringVal = "A String Value";
>> o.numberVal = NumberValue.from(10);
>> o.anArray = Array.create();
>>
>> o.anArray.set(0, "ArrayValue1");
>> o.anArray.set(2, "ArrayValue2");
>> o.anArray.set(2, "ArrayValue3");
>>
>> o.aMap = StringMap.create();
>>
>> o.aMap.put("v1", "A Map Value 1");
>> o.aMap.put("v2", "A Map Value 2");
>>
>> o.embeddedObj = new CommonDataObject2();
>> o.embeddedObj.field1 = "An embbeded object field";
>> return o;
>> }
>>
>> @JsOverlay
>> public final String convolutedSharedMethod(String someArg) {
>> StringBuilder o = new StringBuilder();
>>
>> anArray.forEachElem((e) -> {
>> o.append(aMap.get(someArg));
>> o.append(embeddedObj.field1);
>> o.append(e);
>> });
>>
>> return o.toString();
>> }
>> }
>

gwt-inerop-utils preview

2016-06-02 Thread Paul Stockley
I have committed an initial version of gwt-interop-utils. 

https://github.com/GWTReact/gwt-interop-utils

This library provides some common utilities for working with JsInterop e.g.

1) Object Literal support
2) Shared JSON compatible structures
3) Common functional interfaces
4) JSON utilities
5) Low level Javascript utilities.

One of my major goals was to enable creating complex object literals with 
arrays and maps that could be represented by a single class, accessible 
both on the client and server. You can now define a class such as

import gwt.interop.utils.shared.collections.Array;
import gwt.interop.utils.shared.collections.StringMap;
import gwt.interop.utils.shared.valuetypes.NumberValue;

@JsType(isNative = true, namespace = JsPackage.GLOBAL, name = "Object")
public class CommonDataObject {
public int intVal;
public double doubleVal;
public boolean booleanVal;
public String stringVal;
public NumberValue numberVal;
public Array anArray;
public StringMap aMap;
public CommonDataObject2 embeddedObj;

@JsOverlay
public static CommonDataObject create() {
CommonDataObject o = new CommonDataObject();
o.intVal = 10;
o.doubleVal = 20.20;
o.booleanVal = true;
o.stringVal = "A String Value";
o.numberVal = NumberValue.from(10);
o.anArray = Array.create();

o.anArray.set(0, "ArrayValue1");
o.anArray.set(2, "ArrayValue2");
o.anArray.set(2, "ArrayValue3");

o.aMap = StringMap.create();

o.aMap.put("v1", "A Map Value 1");
o.aMap.put("v2", "A Map Value 2");

o.embeddedObj = new CommonDataObject2();
o.embeddedObj.field1 = "An embbeded object field";
return o;
}

@JsOverlay
public final String convolutedSharedMethod(String someArg) {
StringBuilder o = new StringBuilder();

anArray.forEachElem((e) -> {
o.append(aMap.get(someArg));
o.append(embeddedObj.field1);
o.append(e);
});

return o.toString();
}
}

@JsType(isNative = true, namespace = JsPackage.GLOBAL, name = "Object")
public class CommonDataObject2 {
public String field1;
}

Instances of this class can be encoded to/from JSON using standard JSON 
functions. You can also create/use the same class on the server and full 
emulation is provided. Given this setup, it gives you a lot of the benefits 
of GWT RPC (i.e. shared data objects and behavior across client/server) 
without the code bloat or performance hit.

Before I publish it to Maven, I still need to finish the docs and do some 
more testing. I am also waiting for some compiler fixes to land.

Please take a look and let me know if there are any changes/additions you 
would 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+unsubscr...@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.


Re: JsInterop receipts for simple JSNI code ?

2016-05-27 Thread Paul Stockley
Will this be for J2CL only?

On Thursday, May 26, 2016 at 6:35:36 PM UTC-4, Goktug Gokdogan wrote:
>
> JsInterop will provide some base classes for stuff that are not possible 
> with JsInterop annotations.
>
> On Wed, May 25, 2016 at 1:30 PM, Paul Stockley  > wrote:
>
>> Eval is really slow. I would use JSNI. Eventually I think J2CL will have 
>> a way to execute javascript. Just isolate the JSNI in a helper class so it 
>> can easily be replaced.
>>
>>
>> On Wednesday, May 25, 2016 at 3:35:07 PM UTC-4, Hristo Stoyanov wrote:
>>>
>>> Actually, it might be possible to do it with JsInterop only:
>>>
>>> class Globals {
>>>
>>> @JsMethod(namespace=GLOBAL)
>>> public native Object eval(String expresion);
>>> 
>>> @JsOverlay
>>> public native boolean isVariableDefined(String varName){
>>>  return Boolean.TRUE.equals(eval("!!window['"+varName+"']"));
>>> }
>>>
>>> }
>>>
>>> I guess, you can also use JSON.safeEval() ... but we dont know if will 
>>> survive  in J2CL.
>>>
>>>
>>> On Wednesday, May 25, 2016 at 12:21:26 PM UTC-7, Hristo Stoyanov wrote:
>>>>
>>>> Jens,
>>>> Thanks, so apparently JsInterop cannot be a complete replacement of 
>>>> JSNI?
>>>>
>>>> I was hoping to be able to wrap in @JsType(native = true) something 
>>>> like Object.keys(window) 
>>>> <https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/keys>
>>>>
>>>> On Tuesday, May 24, 2016 at 5:11:39 PM UTC-7, Jens wrote:
>>>>>
>>>>> You still need to use JSNI for accessing these properties. Depending 
>>>>> on the API you want to build you could define @JsOverlay methods inside 
>>>>> @JsType(native = true) classes and let them delegate to a JSNI based 
>>>>> utility class.
>>>>>
>>>>> -- J.
>>>>>
>>>> -- 
>> 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+unsubscr...@googlegroups.com .
>> To post to this group, send email to google-we...@googlegroups.com 
>> .
>> Visit this group at https://groups.google.com/group/google-web-toolkit.
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>

-- 
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+unsubscr...@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.


Re: JsInterop receipts for simple JSNI code ?

2016-05-25 Thread Paul Stockley
Eval is really slow. I would use JSNI. Eventually I think J2CL will have a 
way to execute javascript. Just isolate the JSNI in a helper class so it 
can easily be replaced.

On Wednesday, May 25, 2016 at 3:35:07 PM UTC-4, Hristo Stoyanov wrote:
>
> Actually, it might be possible to do it with JsInterop only:
>
> class Globals {
>
> @JsMethod(namespace=GLOBAL)
> public native Object eval(String expresion);
> 
> @JsOverlay
> public native boolean isVariableDefined(String varName){
>  return Boolean.TRUE.equals(eval("!!window['"+varName+"']"));
> }
>
> }
>
> I guess, you can also use JSON.safeEval() ... but we dont know if will 
> survive  in J2CL.
>
>
> On Wednesday, May 25, 2016 at 12:21:26 PM UTC-7, Hristo Stoyanov wrote:
>>
>> Jens,
>> Thanks, so apparently JsInterop cannot be a complete replacement of JSNI?
>>
>> I was hoping to be able to wrap in @JsType(native = true) something like 
>> Object.keys(window) 
>> 
>>
>> On Tuesday, May 24, 2016 at 5:11:39 PM UTC-7, Jens wrote:
>>>
>>> You still need to use JSNI for accessing these properties. Depending on 
>>> the API you want to build you could define @JsOverlay methods inside 
>>> @JsType(native = true) classes and let them delegate to a JSNI based 
>>> utility class.
>>>
>>> -- J.
>>>
>>

-- 
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+unsubscr...@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.


Re: window.showModelDialog replacement

2016-05-25 Thread Paul Stockley
What we did in our project to migrate these kind of modal windows on IE was 
as follows:-

1) Create a GWT modal dialog with an iframe in it and point this to the url 
for the window.
2) Add some code to the existing page to talk to the parent GWT window to 
close the dialog when the user clicks the submit or close button

There are quite a few more details to get it working smoothly but it works 
well. We also moved the submit/action/cancel buttons out of the legacy page 
and used GWT to render them. We then call into methods in the iframe when 
the user clicks on the GWT buttons. 

If you need more details I can give you a few tips. Unfortunately I can't 
share code because we don't use standard GWT widgets.

On Wednesday, May 25, 2016 at 3:12:04 AM UTC-4, Thomas Broyer wrote:
>
> You won't find any equivalent. The platform has moved over to an "all 
> async" model so you'll have to rewrite this code to work asynchronously 
> (including handling other events while waiting for the "return value" to be 
> passed into a callback/event/whatever.
>
> This isn't really a GWT question though, it's more about the web platform.
>

-- 
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+unsubscr...@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.


GWTReact gwt-mobx release

2016-05-18 Thread Paul Stockley
I have pushed the initial version of gwt-mobx to maven central. For details 
see below

https://plus.google.com/118432214189324759065/posts/AUneMdPApZf

-- 
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+unsubscr...@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.


Re: GWT React preview release on Maven Central

2016-05-14 Thread Paul Stockley
Thanks, I am new to Gradle and I am sure that will have saved me many hours 
of investigation.

On Saturday, May 14, 2016 at 9:25:40 AM UTC-4, Christian Bauer wrote:
>
> tasks.withType(de.richsource.gradle.plugins.gwt.AbstractGwtActionTask) {
>
> //args "-logLevel", "TRACE"
> args "-generateJsInteropExports"
> args "-noincremental" // TODO Had problems with this, so disabling until 
> stable in 2.8.0
> // I've had various problems with this cache and GWT snapshot updates, so 
> it's a good idea to make it easily cleanable
> jvmArgs("-Dgwt.persistentunitcachedir=$project.buildDir/gwt/cache")
>
> }
>

-- 
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+unsubscr...@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.


Re: GWT React preview release on Maven Central

2016-05-13 Thread Paul Stockley
The problem I've got is that I need to pass the -generateJsInteropExports flag. 
The plugin doesn't support this.

On Friday, May 13, 2016 at 10:40:15 AM UTC-4, Paul Stockley wrote:
>
> I have pushed preview versions of gwt-react, gwt-react-router and 
> gwt-redux to Maven Central. Check out the documentation for details. 
> https://github.com/GWTReact
>
> Soon I hope to have a Gradle build file to make it easy to try out the 
> examples. I am just working around some issues with the Gradle gwt plugin 
> and GWT 2.8
>
> My next priority is to finish the MobX integration and then work on 
> stabilizing the interface towards a 1.0 release. Our company will start 
> using gwt-react and gwt-mobx in a production application within the next 4 
> months. I am sure this will flush out any issues relatively quickly.
>

-- 
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+unsubscr...@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.


GWT React preview release on Maven Central

2016-05-13 Thread Paul Stockley
I have pushed preview versions of gwt-react, gwt-react-router and gwt-redux 
to Maven Central. Check out the documentation for details. 
https://github.com/GWTReact

Soon I hope to have a Gradle build file to make it easy to try out the 
examples. I am just working around some issues with the Gradle gwt plugin 
and GWT 2.8

My next priority is to finish the MobX integration and then work on 
stabilizing the interface towards a 1.0 release. Our company will start 
using gwt-react and gwt-mobx in a production application within the next 4 
months. I am sure this will flush out any issues relatively quickly.

-- 
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+unsubscr...@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.


Re: GWT Material Design Addins

2016-05-11 Thread Paul Stockley
I would post to either the G+ group 
(https://plus.google.com/communities/108005250093449814286) or gitter 
(https://gitter.im/GwtMaterialDesign/gwt-material?source=suggested-menu)

On Wednesday, May 11, 2016 at 12:07:09 PM UTC-4, Velusamy Velu wrote:
>
> I followed these steps to use the MaterialWindow addin from the 
> gwt-material-addins-1.5.0.jar in an application.
>
>1. Downloaded gwt-material-addins-1.5.0.jar and added to application's 
>build path in Eclipse.
>2. Added the line  in the ..gwt.xml
>3. Added the line 
>xmlns:ma="urn:import:gwt.material.design.addins.client" in the 
>UiBinder.
>4. Then started adding the line "window" width="50%" title="Documents"> in the UiBinder 
>
> But MaterialWindow is not visible to the UiBinder.  Any idea what could be 
> wrong?
>

-- 
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+unsubscr...@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.


Re: jsinterop: create cast native types: JavaScriptObject

2016-05-11 Thread Paul Stockley
Declare your objects as 

@JsType(isNative = true, namespace=JsPackage.GLOBAL, name="Object")

You can then just use new.

On Wednesday, May 11, 2016 at 11:16:07 AM UTC-4, Vassilis Virvilis wrote:
>
> Hi,
>
>
> I am trying to construct with jsinterop a json config object for 
> datatables. Here is an example
>
> var table = $wnd.$(table_selector).DataTable({
> "dom" : 'lf<"dateRange"><"pull-right"B>rtip',
> "serverSide" : true,
> "ajax" : {
> "url" : ajax_url,
> "dataSrc" : "",
> "data" : {
> "date" : "date_range"
> }
> },
> "columns" : headers,
> "buttons" : [ 'copyHtml5' ]
> });
>
> The idea is to use something like that
>
>@JsType(isNative = true)
> public static class Config {
>
> @JsType(isNative = true)
> public static class Ajax {
>
> @JsType(isNative = true)
> public static class Data {
> String date;
>
> @JsOverlay
> public static Data create() {
> final Data data = createDataObject();
> data.date = "date_range";
> return data;
> }
> }
>
> String url;
> String dataSrc;
> Data data;
>
> @JsOverlay
> public static Ajax create(String url) {
> final Ajax ajax = createAjaxObject();
> ajax.url = url;
> ajax.dataSrc = "";
> ajax.data = Data.create();
> return ajax;
> }
> }
>
> String dom;
> boolean serverSide;
> Ajax ajax;
> JsArray columns;
> JsArrayString buttons;
>
> @JsOverlay
> public static Config create(String url,
> JsArray headers) {
> final Config config = createConfigObject();
> config.dom = "lf<'dateRange'><'pull-right'B>rtip";
> config.serverSide = true;
> config.ajax = Ajax.create(url);
> config.columns = headers;
> config.buttons = createJsArrayString("copyHtml5");
> return config;
> }
> }
>
> Something similar (but simpler) is done for vue.js here 
> https://gist.github.com/bduisenov/2c5ef0e4ff4874f2c5d2
>
> Unfortunately the Datatables are picky and they are poking (iterating) the 
> Config object in the wrong way and they hit the __proto__ and constructor 
> members and the script crashes.
>
> So I had to specify  @JsType(isNative = true) to match the naming and a 
> way to start from a plain javascript plain object {}
>
> The question is how to create and cast in a generic way a {} in my native 
> objects i.e.
> Config, Config.Ajax, Config.Ajax.Data?
>
> I tried
> 1) Config config = new Config(); // protected empty constructor - fails at 
> runtime
>
> 2) Config config = createConfig();
>
> private static native Config createConfigObject()/*-{
> return {};
> }-*/;
>
> This works but I have to create one static function for every native Type 
> I need to create;
>
> 3) Config config = createObject();
>
> private static native  T createObject()/*-{
> return {};
> }-*/;
>
> fails at runtime
>
> 4) Config extends JavascriptObject and use .cast() - fails at compile time
>
> Is any of the 1, 3, 4 supposed to work?
>
>Vassilis
>
>
>
>
>
>
> -- 
> Vassilis Virvilis
>

-- 
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+unsubscr...@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.


GWT React initial version

2016-04-24 Thread Paul Stockley
I just pushed an example to gwt-react-examples showing how to combine react 
with Widgets.

-- 
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+unsubscr...@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.


Re: Compile a Java application into a single JavaScript file?

2016-04-24 Thread Paul Stockley
Just define another gwt.xml file for your app that points to the same entry 
point but uses the sso linker and use this for debugging,

On Sunday, April 24, 2016 at 3:16:25 AM UTC-4, Kirill Prazdnikov wrote:
>
>
> 
>
>
> I tried that and this is great. Now I have the only script file and this 
> is not a string like with the xsf linker, this is a normal JS file.
>
> More, I do not need to collapse all perms since I use the only default one 
> for all browsers. It does all I need.
>
> However I have to switch to xsf when I want to start the SDM
>

-- 
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+unsubscr...@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.


GWT React initial version

2016-04-22 Thread Paul Stockley
I have pushed the initial version of GWT React  
to Github It is still very much as work in progress, but I it is definitely 
a viable project. 

The API for React itself is pretty complete. Redux works for the basics but 
I need to test out middleware and store enhancers. I have only tested the 
very basics of React Router and there is more work to do.

I am working on testing interop with existing GWT code. I am also working 
on an interface to https://github.com/mobxjs/mobx. I think this will 
actually be better suited to integrating into existing GWT projects than 
Redux. Its super simple and I think it will become the next big thing. 
Check out 
https://speakerdeck.com/mweststrate/state-management-is-easy-introduction-to-mobx

Currently, you will have to check out all the projects and import them into 
your IDE (I use intellij) to build them. The code WILL NOT work with the 
beta version of 2.8. You will need a snapshot build.

Take a look and let me know what you think.
[image: GWT React]
GWT React
github.com

no plus ones

-- 
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+unsubscr...@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.


Re: GWT React

2016-04-14 Thread Paul Stockley
I plan on doing this. I have a couple of things I need to prove out then I 
will start working on setting up the Github projects. I will post a preview 
to my google drive in a couple of weeks so you can take a look while I work 
on setting up the projects on Github.

On Thursday, April 14, 2016 at 1:35:06 AM UTC-4, Debasish Padhy wrote:
>
> Hi Paul,
>
> Is there a possibility of you sharing the codebase over github and put a 
> license to it ? I have been working extensively with JsInterOp / TypeScript 
> cross usage and find your  POC interesting and would love to contribute if 
> its with an open license.
>
> thanks,
> Debasish
>
> On Thursday, April 7, 2016 at 6:48:27 PM UTC+5:30, Paul Stockley wrote:
>>
>> Sorry,
>>   I was just updating it to include samples for Redux that I just got 
>> working. The new link is 
>> https://drive.google.com/folderview?id=0Bxp8vLBG2ol3ZERCc3lHUEhKU2M&usp=sharing
>>
>

-- 
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+unsubscr...@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.


GWT React - Update

2016-04-07 Thread Paul Stockley
I have managed to get Redux working. I implemented the following examples 

http://redux.js.org/docs/introduction/Examples.html#counter
http://redux.js.org/docs/introduction/Examples.html#todos-with-undo

You can see the code on my google drive below:

https://drive.google.com/folderview?id=0Bxp8vLBG2ol3ZERCc3lHUEhKU2M&usp=sharing

I also updated the todomvc example based on my new more refined API.

I am just creating a sample to exercise most of the React API. I also need 
to prove out inter-op with existing GWT widgets and also test with a 
production build. At the moment it only works on the latest snapshot build 
of GWT2.8. Hopefully a RC candidate will be out by the time I finish.

When this is done I will publish a preview version of GWT React. I would 
like to get some feedback before I turn it into an official project on 
Github.

-- 
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+unsubscr...@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.


Re: GWT React

2016-04-07 Thread Paul Stockley
Sorry,
  I was just updating it to include samples for Redux that I just got 
working. The new link is 
https://drive.google.com/folderview?id=0Bxp8vLBG2ol3ZERCc3lHUEhKU2M&usp=sharing

-- 
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+unsubscr...@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.


Re: GWT React

2016-04-07 Thread Paul Stockley
Sorry,

-- 
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+unsubscr...@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.


Re: GWT React

2016-04-01 Thread Paul Stockley
Just a quick update. I am continuing to finish and refine the API. I got a 
basic Redux example working. Every sample I convert exposes other areas I 
need to work on to make the API as usable as possible. I will post some 
details on the challenges of converting something like React to Java. The 
good thing is I haven't hit any roadblocks so far.

I am only working on the project in the evenings so I will probably be 
another 3-4 weeks before I have something I can let you play with. I think 
I will post the code on my google drive to start with. Once the API settles 
down and I have some more time I will create a project on github.

-- 
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+unsubscr...@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.


GWT React

2016-03-24 Thread Paul Stockley


We currently have a large GWT application that we have been working on for 
the last 4 years. We use Uibinder and Widgets very

 heavily, although we have our own Widget set and RPC mechanism. The 
application is being constantly expanded and realistically 

won’t be fully rewritten for 8-10 years. Given the news about J2CL not 
supporting widgets, I have been thinking about how we could 

migrate to a world without widgets on an incremental basis.  

 

In parallel, I have also being exploring writing native mobile apps. We 
tried the mobile web but it wasn’t great and we really needed

hardware integration for NFC and total offline capabilities. Which brings 
us React. I found React Native and started researching 

and playing around. I have to say I am very impressed. In my mind it is a 
game changer. They are getting close to allowing one code 

base to support iOS, Android and the Web with only about 10-20% custom code 
for each platform. 

 

The more I played with React Native, the more I liked the React declarative 
model for defining UI’s. I started thinking that React 

would be ideal for incrementally embedding within an existing GWT 
application. Facebook designed it so they could incrementally

role it out into their existing Web application. When GWT 2.8 beta came 
out, I wanted something to try the new JsInterop out on.

React seemed like a good candidate. After a couple of weeks of 
experimenting, I have a working proof of concept for React. I 

have to say it was a real challenge and really pushed the capabilities of 
JsInterop. I had to do some javascript hacking to get it 

to work. My goal was to create an interface that was as close to JavaScript 
as possible. That way you could use the many React

tutorials and apply them to writing GWT React code without some huge mental 
translation.

 

I decided to try and port http://todomvc.com/examples/react/#/ to Java. The 
reason for this was so I could have a direct comparison 

between the Java and Javascript code. I have implemented enough of the 
React API to get this working. In addition, I also integrated 

a 3rd party React component called React Router (
https://github.com/reactjs/react-router). This is pretty much the de facto 
standard 

for routing in the React world. This proved that I could consume React 
components written by other people. Overall I am pleased with 

how it turned out. I find the java version easier to follow, especially 
since the Prop types are explicit. It would be nice to support JSX

 instead of the legacy createElement interface. However, it isn’t terrible. 
The Java version was 465 lines in total vs 419 for the original 

JavaScript code. If you take out the import statements which I don’t really 
count because the IDE creates them for you, the Java version 

was actually only 414 lines. You can take a look at the code here :

 

https://drive.google.com/folderview?id=0Bxp8vLBG2ol3NjAtRmdjMDhlc0k&usp=sharing

 

At this point I am about 80% sure what I have created could become a viable 
production solution. The next steps I want to do are:



   1. Finish the API
   2. Test embedding Gwt React within an existing GWT Widget based 
   application.
   3. Build an API for Redux (https://github.com/reactjs/redux) and React 
   Redux (https://github.com/reactjs/react-redux) which is becoming the de 
   facto standard for the MC in MVC. I will probably re-implement todomvc 
   using this. 

 

If I don’t hit any roadblocks, I will either publish to Github or make the 
source publicly available. I haven’t made my mind up on which approach I 
will take.

-- 
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+unsubscr...@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.


Re: Complex Overlay Type

2016-03-22 Thread Paul Stockley
So it looks like pages is actually a hashtable of pageid's to page objects. 
You can use a class similar to the following and define pages using it


public class JsMap extends JavaScriptObject{
   
   protected JsMap() {
   }
   
   public final native T get(String key) /*-{
  return this[key] ||  null;
   }-*/;
   
   public final native void put(String key, T value) /*-{
  this[key] = value;
   }-*/;

   public final native void remove(String key) /*-{
  delete this[key];
   }-*/;
   
   public final native boolean hasKey(String key) /*-{
  return  this[key] !== undefined;
   }-*/;

   public final native JsArray keys() /*-{
  var o = [];
  
  for(var prop in this) {
 if (this.hasOwnProperty(prop))
o.push(prop);
  }
  
  return o;
   }-*/;
   
   public final native JsArray values() /*-{
  var o = [];
   for (var prop in this) {
  if (this.hasOwnProperty(prop)) {
  o.push(this[prop]);
  }
   }
   return o;
   }-*/;
   
   public static native  JsMap createMap() /*-{
  return {};
   }-*/;
}


You can then iterate through the page(s) using the values method.



On Tuesday, March 22, 2016 at 8:08:54 PM UTC-4, Michael Esser wrote:
>
> Hi there,
>
> I'm trying to parse data from a wiki and want to use overlay types. For 
> simple types I have no problem.
> But in the following there is a property dynamicaly created by the server 
> and I have no idea to get the data.
> Any suggestions would be helpful.
>
> Here the data:
> The problem is the "4180" which is dfifferent for each call I didn't know 
> it.
> Nested types didn't solve the problem because I do not know the property 
> "4180".
>
> Thanks and best regards,
> Michael
>
> {
> "batchcomplete": "",
> "query": {
> "pages": {
> "4180": {
> "pageid": 4180,
> "ns": 0,
> "title": "Kalifornien",
> "revisions": [
> {
> "contentformat": "text/x-wiki",
> "contentmodel": "wikitext",
> "*": "{{quickbar\n| Lage={{Vorlage:USA-map|Map of USA 
> CA.svg|Kalifornien|250px"
> }
> ]
> }
> }
> }}
>
>

-- 
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+unsubscr...@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.


Re: When will GWT 2.8 GA realistically happen?

2016-01-20 Thread Paul Stockley
Some notes on the expected release

https://groups.google.com/forum/#!topic/gwt-steering/VL8Af2Ae7WM



On Thursday, January 14, 2016 at 6:03:21 AM UTC-5, Marcin Okraszewski wrote:
>
> Hi,
> We have hit a bug with SDM in 2.7, when we use shared CSS via interfaces 
> inheritance. It seems to be fixed in 2.8 beta. Therefore a question - when 
> can we expect GA to happen? 
>
> Thank you,
> Marcin
>

-- 
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+unsubscr...@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.


Re: Custom widget child elements

2014-01-07 Thread Paul Stockley
You could try storing the child widget in a private member variable and 
then in onAttach() actually add the child widget to its parent. This is the 
approach I have taken when using UiChild.



On Friday, January 3, 2014 9:16:23 AM UTC-5, Ben Cuthbert wrote:
>
> Hi All,
>
> I have created a custom widget that extends ComplexPanel so that it can 
> have children.
>
> The UIBinder looks like so
>
> 
>
>  
>
>   
>
>   
>
>  
>
>  
>
>
> In the Layout class that extends ComplexPanel I have a method to add to top
>
>
> @UiChild( tagname = "top" )
>
> public final void addTopPanel(Element widget) {
>
>  addPanelToParent(TOP_CONTENT_TAG, widget);
>
>  }
>
>
> The issue I see is that when UIBinder builds the page it trys to load the 
> child element of layoutPanel before building and calling onLoad of 
> layoutPanel. The child needs to the parent element layoutPanel to be 
> initialised before it attempts to load itself onto the parent if that 
> makes sense. Basically like the Document.ready(), once that is called the 
> child can add to the parent.
>
> The only way around this was to create an eventBus msg and fire it into 
> the application once the entire app has loaded and then manually create a 
> class of the Child widget and add it to the parent. 
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit+unsubscr...@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/groups/opt_out.


Re: GWT - So terribly slow that makes development hard ... very hard ... extremely hard ...

2013-04-18 Thread Paul Stockley
performance improvement definitely seems to be an immediate priority. See 
the draft roadmap

https://docs.google.com/document/d/1bmp0a-d5cb_Sqb4w9rZyfMhg7i6lYfLLt3zymIFoAmo/edit

On Thursday, April 18, 2013 1:22:15 PM UTC-4, Ani wrote:
>
> Now that we have been using GWT for a while ... what do you think? Was it 
> the right choice or thinking of migrating to other framework?
>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit+unsubscr...@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




Re: GWT Benchmarks, Java Virtual Machine vs GWT+browser JsVM

2013-02-07 Thread Paul Stockley
One thing I will be interested to see is the effect 
of enableClosureCompiler=true. It does significantly reduce the  JS file 
size in many cases. However, I have read people complaining that the 
resulting code was slower.


On Thursday, February 7, 2013 10:53:21 AM UTC-5, Fabiano Tarlao wrote:
>
>
>
> Il giorno giovedì 7 febbraio 2013 16:14:32 UTC+1, Paul Stockley ha scritto:
>>
>> For sure we release production code with the following flags
>>
>>
>>- true
>>- true
>>
>>
>> Also you don't specify what version of IE you are testing with, I assume 
>> IE9
>>
>
> The graph leged doesn't specify, but I have pointed the IE version in the 
> blog post, it is IE9
>
> Why do tou disable "for sure" that option? Is it for perfromance? What is 
> exactly sure in disablinng Cast checking? 
>
> Regards
>
>  
>
>>
>> On Thursday, February 7, 2013 10:10:54 AM UTC-5, Fabiano Tarlao wrote:
>>>
>>> Hi,
>>>  in fact I have not specied not used particular optimization arguments.
>>> I have not disabled CastChecking and ClassMetadata, and I have not 
>>> explicitly set the optimization level (but the default is the maximum 
>>> value).
>>> By using defaults my current configuration is:
>>>
>>>
>>> *GWT Compiler Arguments - *
>>>
>>>- false
>>>- false
>>>- false
>>>- 9
>>>
>>> *GWT module options in .gwt.xml*
>>> 
>>>
>>> About the  first two options, I dunno know If it is correct to disable 
>>> them in order to do a fair comparison. I suppose that those features should 
>>> be useful in a real production enviroment, am I right?What is you  opinion?
>>>
>>> The  only option I'm going to enable in the next benchmark update is the 
>>> new enableClosureCompiler.
>>> I'm open to suggetions and criticism.
>>> Regards
>>>
>>>
>>> Il giorno mercoledì 6 febbraio 2013 10:21:46 UTC+1, Sachin Shekhar R ha 
>>> scritto:
>>>>
>>>>
>>>> I am not sure whether you turned on all GWT compiler arguments and some 
>>>> turn off some Dev specific GWT features. 
>>>>
>>>> *GWT Compiler Arguments - *
>>>>
>>>>- true
>>>>- true
>>>>- true
>>>>- 9
>>>>
>>>> *GWT module options in .gwt.xml*
>>>>
>>>>- 
>>>>
>>>>
>>>>
>>>> On Sunday, February 3, 2013 6:20:40 AM UTC+5:30, Fabiano Tarlao wrote:
>>>>>
>>>>> Hi,
>>>>>  I have wrote a simple benchmark suite in java and I have run with 
>>>>> JavaSE 1.7.0 and, thanks to GWT, I have run the same code on 
>>>>> Firefox,Chrome,MSIE and Opera.
>>>>>
>>>>> My results, with the experiment details are published 
>>>>> here:http://thegoodcodeinn.blogspot.it/2013/02/gwt-benchmarks-gwtjsvm-vs-javavm.html
>>>>>
>>>>> You know, Javascript VM have highly improved recently but how good is 
>>>>> GWT at compiling java into Javascript? And.. how efficient is the GWT 
>>>>> compiled code+JsVM compared to Java bytecode running on a Java Virtual 
>>>>> Machine??
>>>>> I was just curious about.
>>>>>
>>>>> Hope you like this experiment, comments are appreciated.
>>>>> Have fun
>>>>>
>>>>> Fabiano
>>>>>
>>>>> PS:
>>>>> My benchmark is oriented to numeric, data crunching; no multimedia.
>>>>> I'll also release the benchmark code later.. if requested. I'm only a 
>>>>> bit lazy at the moment.
>>>>>
>>>>>   
>>>>>
>>>>

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit+unsubscr...@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




Re: GWT Benchmarks, Java Virtual Machine vs GWT+browser JsVM

2013-02-07 Thread Paul Stockley
For sure we release production code with the following flags


   - true
   - true


Also you don't specify what version of IE you are testing with, I assume IE9

On Thursday, February 7, 2013 10:10:54 AM UTC-5, Fabiano Tarlao wrote:
>
> Hi,
>  in fact I have not specied not used particular optimization arguments.
> I have not disabled CastChecking and ClassMetadata, and I have not 
> explicitly set the optimization level (but the default is the maximum 
> value).
> By using defaults my current configuration is:
>
>
> *GWT Compiler Arguments - *
>
>- false
>- false
>- false
>- 9
>
> *GWT module options in .gwt.xml*
> 
>
> About the  first two options, I dunno know If it is correct to disable 
> them in order to do a fair comparison. I suppose that those features should 
> be useful in a real production enviroment, am I right?What is you  opinion?
>
> The  only option I'm going to enable in the next benchmark update is the 
> new enableClosureCompiler.
> I'm open to suggetions and criticism.
> Regards
>
>
> Il giorno mercoledì 6 febbraio 2013 10:21:46 UTC+1, Sachin Shekhar R ha 
> scritto:
>>
>>
>> I am not sure whether you turned on all GWT compiler arguments and some 
>> turn off some Dev specific GWT features. 
>>
>> *GWT Compiler Arguments - *
>>
>>- true
>>- true
>>- true
>>- 9
>>
>> *GWT module options in .gwt.xml*
>>
>>- 
>>
>>
>>
>> On Sunday, February 3, 2013 6:20:40 AM UTC+5:30, Fabiano Tarlao wrote:
>>>
>>> Hi,
>>>  I have wrote a simple benchmark suite in java and I have run with 
>>> JavaSE 1.7.0 and, thanks to GWT, I have run the same code on 
>>> Firefox,Chrome,MSIE and Opera.
>>>
>>> My results, with the experiment details are published 
>>> here:http://thegoodcodeinn.blogspot.it/2013/02/gwt-benchmarks-gwtjsvm-vs-javavm.html
>>>
>>> You know, Javascript VM have highly improved recently but how good is 
>>> GWT at compiling java into Javascript? And.. how efficient is the GWT 
>>> compiled code+JsVM compared to Java bytecode running on a Java Virtual 
>>> Machine??
>>> I was just curious about.
>>>
>>> Hope you like this experiment, comments are appreciated.
>>> Have fun
>>>
>>> Fabiano
>>>
>>> PS:
>>> My benchmark is oriented to numeric, data crunching; no multimedia.
>>> I'll also release the benchmark code later.. if requested. I'm only a 
>>> bit lazy at the moment.
>>>
>>>   
>>>
>>

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit+unsubscr...@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




Re: GWT RPC future ?

2013-02-06 Thread Paul Stockley
We had similar issues with RPC especially on the iPad. In the end I wrote a 
new RPC mechanism based on the command pattern that is entirely JSON based. 
The client representation of server side java objects are JSO's that are 
automatically maintained by a generator (outside of GWT). The RPC framework 
uses Jackson on the server for converting the Java objects to JSON. 

Our system also does batching and client side caching (controlled by java 
annotations). The end result is I no longer worry about performance, even 
for large and complex payloads. The downside is that the client 
representation isn't the same as the server and you have to deal with 
JSO's. Debugging wasn't as nice because you couldn't inspect JSO's. That 
was until SuperDevMode came along and now its fine. 

If you don't want to go to that extreme, for specific slow calls you could 
just pass back json and parse it on the client and access the objects as 
JSO's. Alternatively, you could try one of the GWT REST frameworks.



On Wednesday, February 6, 2013 10:37:35 AM UTC-5, stuckagain wrote:
>
> Hi,
>  
> Not sure where to ask this question, but I was wondering if the GWT devs 
> every plan to fix the inefficient GWT-RPC ?
> The problem happens mostly on IE (all versions), although I assume other 
> browsers might benefit as well since a lot of cpu cycles are wasted on 
> things that should be trivial for a browser.
>  
> I had to improve multiple GWT apps that all stumble on these 3 problems:
> - deserialisation is terribly inefficient - it can take many seconds to 
> serialize small sets of data,
> - on IE I can get slow script warnings
> - I sometimes get stack over flows with deeply nested structures.
>  
> For example when I send over a tree of 1 nodes (takes 20ms to create), 
> it takes 5 seconds or more to deserialize. (I can give you a demo app that 
> shows the problem)
>  
> I only get 2 seconds to impress my users, and I need to do quite a lot of 
> operations besides sending the RPC.
>  
> I've heared the reactions multiple times: don't send soo much data over, 
> but bytewise this is not soo much. It is highly compressible (just a few K 
> in fact) data. We want to process complex data structures in the client, we 
> don't want to create intermediate data structures to bypass the RPC 
> inefficiencies.
>  
> There have been multiple attempts from google to write something better 
> (DeRPC whichi is now deprecated, and RequestFactory which is very badly 
> documented so I don't even know if I could reuse this one for generic RPC 
> calls).
>  
> Is it not time to start using json as the base format for GWT RPC ? I 
> would even like to help out to get this working! It is really a pitty that 
> somehow RPC is a selling point for GWT but in reality it often becomes the 
> bottleneck of your application.
>  
> Can't we maybe put GWT RPC on the framework for request factory ?
>  
> One issue I also have with GWT RPC (but less pressing as the 
> performanceissue) is the fact that it is not very friendly for mixing 
> different client technologies. If it were a simple json REST payload 
> (without obfuscation and lots of secret numbers) then we could easily reuse 
> it everwhere, it would also make it soo much easier for loadtesting. Not a 
> lot of tools support GWT RPC easily.
>  
> David
>  
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit+unsubscr...@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




RenderablePanel/IsRenderable

2013-02-05 Thread Paul Stockley
Does anyone have any experience using RenderablePanel? I get the basic idea 
but can't find any uses of this or samples. It also states that it is 
experimental and subject to change. Just wondering if I can use it for some 
of my custom widgets? I think it could substantially speed up the rendering 
of some of the more complex screens we have with lots of form elements.

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit+unsubscr...@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




Re: GWT Best practice for preventing duplicate requests and displaying busy icon

2013-02-01 Thread Paul Stockley
I wrote a modal working mask that fades a working indicator into view after 
a second. At any time, input is blocked. The mask also does reference 
counting so if multiple RPC requests are kicked off, the mask is only 
hidden once all the requests are complete.


On Friday, February 1, 2013 9:14:56 AM UTC-5, Marko Mišković wrote:
>
> If you show modal dialog, user can't interact with elements outside of 
> that dialog. You can display dialog every time user start action. Maybe in 
> first second you can set style "display: none". You can try this.
>
> On Thursday, 31 January 2013 03:24:04 UTC+1, andy_p1 wrote:
>>
>> Hello,
>>  I am a new GWT developer and I have been doing a lot of reading, writing 
>> test programs, and watching presentations by GWT gurus. But I have not yet 
>> found any article that shows how to solve the following problem that I 
>> believe should be a vary common problem for GWT applications. If some could 
>> please point me to the right direction, I would really appreciate it. Here 
>> it goes:
>> 1. I have a bunch of services that I can call on the server and I know 
>> that some of those services take a lot of time to return while some are 
>> very quick.
>> 2. I also know that due to unreliable network, the services that are 
>> supposed to return results really quick may also take a long time or may 
>> never even return.
>>
>>
>> Now, based on the above, my UI is supposed to behave like this:
>>
>> 1. For calls that I know are going to take a long time, it should display 
>> "Loading, please wait..." kind of dialog right way. I want to prevent the 
>> user from doing anything for say at least 10 seconds and after that I will 
>> assume that something is wrong and remove the dialog and let the user do 
>> whatever he wants.
>>
>> 2. For calls I know will return quickly, I don't want to show the "Please 
>> wait" dialog right away. May be wait for a second (because I expect a 
>> response in a second), and then show the dialog. But when the dialog is NOT 
>> displayed, I don't want the same request to be fired again and again. i.e. 
>> I don't want the user to rapid fire the "Do It" button.
>>
>> Is there a standard way to handle this kind of a thing in GWT?
>>
>> thank you!
>>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit+unsubscr...@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




Obfuscation tuning

2013-01-29 Thread Paul Stockley
We are having some issues on IE tracking down some errors in production. IE 
is often less than helpful in that it often doesn't give you any call 
stack, Instead you get messages like

(TypeError): Unable to get value of the property 'f': object is null or 
undefined description: Unable to get value of the property 'f': 

We don't want to turn on stack trace emulation because it slows things down 
too much. So we have been deploying with obfuscation mode = pretty. The 
problem is that the file sizes become huge. What I would like is some way 
to tune the obfuscation output to do the following:

1) Remove all white space
2) Obfuscate function names (we can look up these in the symbol map)
3) Leave variables and object fields unobfuscated

Does anyone know if there is any control on how things are obfuscated?

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit+unsubscr...@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




Re: Intellij for GWT app development. Is it worth it?

2013-01-26 Thread Paul Stockley
The auto make doesn't work anytime a debugger is running. I used to use a 
plugin that did a make anytime a change was made to a file. This actually 
worked better in my opinion. I haven't tried it on v12 yet.

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
Visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




Re: How get widget width, after it's drawed ?

2013-01-22 Thread Paul Stockley
Try this method that uses ComputedStyle. I couldn't be bothered to optimize 
it with deferred binding so it does some runtime checks.

static public native String getComputedStyleProperty(Element el, String 
property) /*-{
if (window['getComputedStyle']) { // W3C DOM method
if (property === 'float')
 property = 'cssFloat';

var value = el.style[property], computed;

if (!value) {
computed = 
el['ownerDocument']['defaultView']['getComputedStyle'](el, null);
if (computed) { // test computed before touching for safari
value = computed[property];
}
}
return value;

} else if (el['currentStyle']) {
var value;

switch(property) {
case 'opacity' :// IE opacity uses filter
value = 100;
try { // will error if no DXImageTransform
value = 
el.filters['DXImageTransform.Microsoft.Alpha'].opacity;

} catch(e) {
try { // make sure its in the document
value = el.filters('alpha').opacity;
} catch(err) {
}
}
return value / 100;
case 'float': // fix reserved word
property = 'styleFloat'; // fall through
default:
value = el['currentStyle'] ? 
el['currentStyle'][property] : null;
return ( el.style[property] || value );
}
}
return "";
}-*/;


On Monday, January 21, 2013 10:01:34 AM UTC-5, Michał Zakrzewski wrote:
>
> Thanks for your help, but my problem is still not resolved. Sometimes I 
> have good value, sometimes not...

-- 
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/-/lZ3GfyXkx0gJ.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: SuperDev Mode Java files are not sent to the browser

2013-01-14 Thread Paul Stockley
I think the issue could be related to this:

https://gwt-review.googlesource.com/#/c/1300/1

On Monday, January 14, 2013 7:46:26 PM UTC-5, emurmur wrote:
>
> Unfortunately, I'm just now experiencing the same thing.  It started 
> happening immediately after I update to Chrome 25.  It's not clear yet that 
> Chrome 25 is the issue.  Here is what I did;
>
> 1) I was in Chrome 23, happily using code server for compiling and source 
> maps and chrome dev tools for debuggging.
> 2) I wanted to try the new speech features in Chrome 25, so installed the 
> beta, the restarted chrome (while eclipse and code server were running).
> 3) I opened up the html file again.  I made some changed to my source and 
> compiled it in chrome using the code server bookmark. It compiled 
> correctly, but only javascript source was available.  The compiler output 
> shows the source maps are enabled.  I checked the chrome dev tools setting 
> and they indicate source maps are still enabled in chrome.
> 4) I then did a bunch of stuff in various combinations,refreshing the 
> page, clearing the cache, restarting chrome, restarting code server, doing 
> full GWT compile then starting code servers, etc.  Still no source maps.
>
> So, I'm not sure if it was the upgrading of the browser, or restarting the 
> browser while code server was running.  I'll continue to work on this and 
> let you know what I find.  If you figure this out, please reply and let me 
> know what you found.  Thanks much.
>
> Ed
>
>
> On Sunday, January 13, 2013 1:06:24 AM UTC-8, ustakraharez wrote:
>>
>> Dear All,
>>
>> I have a strange problem with SuperDev mode. Sometimes it sends the java 
>> files to the browser, sometimes (and sadly more times :-)) it don't.
>>
>> - SuperDev mode run configuration set, and working.
>> - Superdev mode url working
>> - Bookmarks are working, and when I hit Dev Mode On, compiling working 
>> (console logged in Eclipse)
>> - But here, nothing happens. When I follow the modulename url from the 
>> browser, I can see the compiled source files, but when I open Chrome Web 
>> tools, on Sources (and Profiling) tabs only the cache.js can be seen. 
>> Source Maps enabled in Chrome of course.
>>
>> I also aware, that if source maps working properly, the *[WARN] : Source 
>> maps sent for module : moduleName* can be seen in Eclipse logs. I only 
>> don't understand, what is the reason why it is sometimes working and more 
>> times not.
>>
>> Thanks a lot for your help!
>>
>

-- 
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/-/FALdHOwn5NsJ.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: SuperDev Mode Java files are not sent to the browser

2013-01-13 Thread Paul Stockley
One you bring the dev tools up hit refresh on the page.


On Sunday, January 13, 2013 4:06:24 AM UTC-5, ustakraharez wrote:
>
> Dear All,
>
> I have a strange problem with SuperDev mode. Sometimes it sends the java 
> files to the browser, sometimes (and sadly more times :-)) it don't.
>
> - SuperDev mode run configuration set, and working.
> - Superdev mode url working
> - Bookmarks are working, and when I hit Dev Mode On, compiling working 
> (console logged in Eclipse)
> - But here, nothing happens. When I follow the modulename url from the 
> browser, I can see the compiled source files, but when I open Chrome Web 
> tools, on Sources (and Profiling) tabs only the cache.js can be seen. 
> Source Maps enabled in Chrome of course.
>
> I also aware, that if source maps working properly, the *[WARN] : Source 
> maps sent for module : moduleName* can be seen in Eclipse logs. I only 
> don't understand, what is the reason why it is sometimes working and more 
> times not.
>
> Thanks a lot for your help!
>

-- 
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/-/3fV7ap1XoqcJ.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: Open url in new mobile safari instance?: Window.open()

2012-12-30 Thread Paul Stockley
This works on iOS Fullscreen web applications. I think it may also work on 
a UIWebView

public void open(String url) {
 Anchor a = new Anchor();
a.setTarget("_new");
a.setHref(url);
RootPanel.get().add(a);
 NativeEvent e = Document.get().createHtmlEvent("click", true, true);
a.getElement().dispatchEvent(e);
RootPanel.get().remove(a);
}


On Sunday, December 30, 2012 1:57:50 PM UTC-5, markww wrote:
>
> Hi,
>
> I have a Button, when clicked, I'd like to open a url in a new browser 
> instance. The following works on desktop:
>
> Window.open(url, "_blank", null);
>
> When I run the same code in a UIWebView on ios, nothing happens. Ideally 
> I'd like to open a new instance of mobile safari directed to that url. Does 
> anyone have any ideas of how to do this? I can fall back on catching the 
> url in my objective-c code, but ideally there's something we could do 
> directly in javascript to trigger mobile safari to open,
>
> Thanks
>

-- 
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/-/UVzOE3n_CyQJ.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



How to determine if you are running in SuperDevMode

2012-12-17 Thread Paul Stockley
Is there a way to tell if you are running in SuperDevMode? I want to add 
some extra debugging specifically when developing. GWT.isScript() obviously 
isn't useful in this case.

-- 
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/-/m0iCaNVIiOsJ.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Question about shared code

2012-11-20 Thread Paul Stockley
I have some classes that I want to share between server and client code. 
The problem is they contain methods with vargs that are not supported on 
the client. I only want to use these on the server. Is there some way to 
tell the compiler to ignore these methods for client code.

-- 
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/-/E1AkHDG9WmgJ.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: SuperDevMode not so super

2012-11-15 Thread Paul Stockley
One tip in the chrome dev tools to find a source file is to select the 
sources window and just start typing the name of the file. This will take 
you to the files that match as you type.

On Wednesday, November 14, 2012 3:24:35 AM UTC-5, Stefan Röck wrote:
>
> In a larger GWT multi project app and it took me several hours to get the 
> new SuperDevMode running (I found this 
> videovery
>  helpful).
> Now, I'm a bit disappointed about the coolest new feature of 2.5 and I 
> wonder if I have missed something.
>
>- Compilation is slow. It takes between 1 and 2 minutes plus the 
>bootstrap time of my server app. The app has sth above 20k LOC and heavily 
>uses RequestFactory and GIN code generators, maybe that's the reason? So 
>overall startup performance is worse than with standard DevMode.
>- Code changes require a recompile. In DevMode non-structural changes 
>are applied automatically by the Eclipse Debugger.
>- Debugging the code in the Browser is ... hm, it works. But honestly, 
>nothing compare to a IDE debugger. Browsing through the source tree in 
>Chrome is a pain with thousands of classes.
>- GWT CodeServer is very resource intensive. During compilation, I 
>cannot use my machine for anything else. If it's running it takes more 
> than 
>1GB of RAM.
>
> Is anyone successfully using SuperDevMode for larger apps?
>

-- 
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/-/ZQJOUd3Byq8J.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: SuperDevMode not so super

2012-11-14 Thread Paul Stockley
Our project is about 35,000 lines of client and server code. We don't use 
RPC or request factory because we have our own RPC mechanism. We do have 
quite a lot of UI binder files. Super dev mode recompiles take between 6 to 
8 seconds. So it sounds like the generators are your problem. For some 
types of generators, they run every compile even if you haven't changed any 
related code. They are aware of the issue and will be looking into it for a 
future release.

On Wednesday, November 14, 2012 3:24:35 AM UTC-5, StefanR wrote:
>
> In a larger GWT multi project app and it took me several hours to get the 
> new SuperDevMode running (I found this 
> videovery
>  helpful).
> Now, I'm a bit disappointed about the coolest new feature of 2.5 and I 
> wonder if I have missed something.
>
>- Compilation is slow. It takes between 1 and 2 minutes plus the 
>bootstrap time of my server app. The app has sth above 20k LOC and heavily 
>uses RequestFactory and GIN code generators, maybe that's the reason? So 
>overall startup performance is worse than with standard DevMode.
>- Code changes require a recompile. In DevMode non-structural changes 
>are applied automatically by the Eclipse Debugger.
>- Debugging the code in the Browser is ... hm, it works. But honestly, 
>nothing compare to a IDE debugger. Browsing through the source tree in 
>Chrome is a pain with thousands of classes.
>- GWT CodeServer is very resource intensive. During compilation, I 
>cannot use my machine for anything else. If it's running it takes more 
> than 
>1GB of RAM.
>
> Is anyone successfully using SuperDevMode for larger apps?
>

-- 
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/-/q1lGr7hhCo4J.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: Increasing Client-side Storage

2012-11-08 Thread Paul Stockley
Actually the limit is 2500 characters in many browsers as they store the 
data in mult-byte format. Unless the browser supports it, there is no way 
of increasing this. What browser/versions are you using?

On Thursday, November 8, 2012 12:32:04 PM UTC-5, Joseph Lust wrote:
>
> Sounds like a likely browser defect.
>
> Limit of 5MB per app per browser. According to the HTML5 
> spec,
>  
>> this limit can be increased by the user when needed; however, only a few 
>> browsers support this
>
>
> So it really depends on the browser, as my understanding is that the user 
> is prompted to allow greater storage. Clearly you cannot just set it 
> infinite or a malicious page could crash someone's harddrive. What browsers 
> are you using this on and do all of them generate the error?
>
> Sincerely,
> Joseph
>

-- 
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/-/bS05NJqzER0J.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: Intellij for GWT app development. Is it worth it?

2012-10-22 Thread Paul Stockley
I have been an eclipse user for over 8 years and finally had enough of the 
sluggishness and general flakiness. Our development group switched to 
IntelliJ and all I can say is we aren't going back. Currently we are on 
11.x although at home I use 12. 12 isn't stable enough for production yet 
but it has some nice features such as SuperDevMode support and JDK 8 
Closures. One nice feature is that it shows anonymous inner classes in JDK 
8 format which is much cleaner and less verbose. Obviously, this is just 
cosmetic as it works fine on JDK6 and with GWT.

 I installed a theme to get the same syntax coloring as Eclipse and also a 
plugin that does automatic makes each time a file is changed. This makes it 
feel somewhat similar to eclipse.

On Friday, October 19, 2012 12:06:22 PM UTC-4, Jens wrote:
>
> I am thinking about moving away from Eclipse (IMHO 4.2 feels really 
> sluggish) and switching to Intellij IDEA 12 when its released.
>
> Is anybody here that has used both Eclipse + GPE and Intellij + GWT Plugin 
> and can share his/her experience? Having Jetbrains joining the GWT steering 
> group I guess GWT support in Intellij will never fall behind.
>
> So is it worth its money? 
>
> I already tested Intellij 11 and it seems ok, but having some opinions 
> from people that have used Eclipse and Intellij for a longer period of time 
> would be nice. For example I quickly noticed this: 
> http://stackoverflow.com/questions/9763801/why-intellij-idea-prefers-not-to-extend-composite-when-use-gwt-uibinderand
>  wonder whats the rational behind it (UiBinder plays better with Widget 
> instead of IsWidget) and if there are other differences that have the 
> potential of being annoying.
>
> Thanks in advance
>
> -- J.
>

-- 
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/-/8RRiKiXcpfIJ.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: Was there an iOS 6 RC available to smoke test GWT with?

2012-10-03 Thread Paul Stockley
You can get safari pre-releases for the desktop for free by signing up at

https://developer.apple.com/programs/register/

To get iOS pre-releases of safari you have to sign up as an iOS developer 
which for an individual costs $99 a year.



On Wednesday, October 3, 2012 11:22:18 AM UTC-4, Joseph Lust wrote:
>
> So clearly it is a little embarrassing to see our GWT apps break due to 
> the myriad flaws in the premature iOS6 release. While we could tell users 
> to just Google for things that iOS6 breaks and see how halfbaked it is, all 
> they want is for their apps to work. So, I looked, but cannot seem to find 
> how to get a RC of the future iOS releases. Is that possible? Ideally we'd 
> be able to test apps ahead of time rather than just praying. We do this for 
> WinX and Ubuntu RC's, but can it be done for iOS? Thx.
>
>
> Sincerely,
> Joseph
>

-- 
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/-/sfKErdT4twQJ.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: CSS 3 transition+ GWT

2012-09-24 Thread Paul Stockley
I had the same issue as you and ended up patching DomImplStandard to add 
the webkitTransitionEnd event to sinkBitlessEventImpl. 

On Monday, September 24, 2012 4:10:10 PM UTC-4, Joseph Lust wrote:
>
> You should be able to achieve everything you need via CSS class names 
> being added or removed. However, there is one missing functionality which 
> is the transitionend event which is called when a given transition 
> completes. As of GWT 2.4 I cannot get this to work without custom JSNI, 
> which I'd rather not do. The event is not available under DOM.sinkEvent, or 
> under DOM.sinkBitlessEvent (which surprisingly only allows a few predefined 
> events in the DomImpl class, not any string you pass in). 
>
> Perhaps this will be added in a future GWT release?
>
>
> Sincerely,
> Joseph
>

-- 
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/-/zM8EKwFoOXQJ.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: CSS 3 transition+ GWT

2012-09-17 Thread Paul Stockley
I use transitions and they work fine just by using the style object to 
update the property.

On Sunday, September 16, 2012 7:51:59 PM UTC-4, regnoult axel wrote:
>
> Hi Andrei,  
>
> I will try to answer the best I can regarding to your questionsand 
> most of all, regarding to want I have understood about CSS transition and 
> animation
>
>
> *1 - Why do you need to activate it in your code?* 
> *
> *
> What I am looking for, for example, is to manipulate CSS transitions + 
> animation such as "cool effects"... For example, I want to show a popup 
> with a funny and cool effect (animation + transition) and I can not show 
> this effect just with :hover...so I want to do it programatically (for 
> example, when the user scroll at the top of the page, it will appear a 
> slideshow trailer, and this "apparition" should be sexy thanks to CSS 
> transition/animation)...
>
>
> *2 - Do you plan to do something else when the transition activates?*
>
> If you are talking about something related to the widget's animation, not 
> especially...I am just looking for the cool effect... And I am also asking 
> about how to use these CSS transition, because, the only example I have 
> seen is using :hover to activate the transition.
>
> So in a more general way, I am asking if there is alternative to activate 
> these CSS transition without :hover. And, I am asking these question on the 
> GWT forum, because, I just would like to see a simple example manipulating 
> CSS 3 + GWTMaybe I could study some existing lib like VISUAL FOX (
> http://code.google.com/p/visualfox-fx/)
>
> Cheers,
>
>
>
>

-- 
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/-/UZG2isXZLXEJ.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



GWT module may need to be (re)compiled message when using SuperDevMode

2012-09-08 Thread Paul Stockley
Every time I click the compile button from the 'Dev Mode On' bookmarklet, I 
get the 'GWT module '..' may need to be (re)compiled' alert. It works fine 
after that but it's kind of annoying. Anyone have an idea why this happens?

-- 
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/-/R3YJaOoHGQ8J.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: Nasty overlay types restrinction : Only one JavaScriptObject type may implement the methods of an interface

2012-09-06 Thread Paul Stockley
It's because they don't support polymorphism with overlay types. The same 
reason all methods are final and cannot be overridden in sub classes of a 
JSO.

On Thursday, September 6, 2012 2:22:16 PM UTC-4, Sebastián Gurin wrote:
>
> Hi all. I'm writing a lot of GWT overlay types for my new project YUIGWT - 
> http://code.google.com/p/yuigwt/. I'm creating a nice and rich java 
> hierarchy of overlay types there. 
>
> Today I discovered that it is not good to let overlay types (extends 
> JavaScriptObject implement interfaces because it seems that for a certain 
> interface, no more than one overlay type can implement its methods. The 
> error in question is pasted below, but this arrises a big question for me: 
>
> While I understand perfectly what the error means, I would really 
> appreciate if somebody can explain me the reasons behind this nasty 
> restriction ? ??
>
> [ERROR] [org.sgx.yuigwt.YuiGwtTestOnline] - Line 9: Only one 
> JavaScriptObject type may implement the methods of an interface that 
> declared methods. The interface (org.sgx.yuigwt.yui.yql.api.YQLQueryResult) 
> is implemented by both (org.sgx.yuigwt.yui.yql.api.desc.DescResult) and 
> (org.sgx.yuigwt.yui.yql.api.wheather.forecast.WheatherForecastResult)
>
> Thanks in advance.
>

-- 
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/-/yRfzknalyioJ.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: How can we save state of a GWT page?

2012-08-03 Thread Paul Stockley
If we need to remember more information than can reasonably stored on the 
URL we use local storage. The data we need to remember is represented as 
javascript overlay types and we serialize these to/from json.

On Wednesday, July 25, 2012 8:14:20 AM UTC-4, Rubina wrote:
>
> Hi All,
>
>  
>
> We have one requirement to implement in GWT application. Below example 
> will clear the requirement – 
>
>  
>
> There are 3 screens in application. Suppose, user is on 2nd screen after 
> moving from 1st screen to 2nd screen. When user clicks on Next button on 
> first screen, then some RPC call is executed and fetch data from some 
> external database. This data is used to display on 2nd screen. Now user 
> bookmarks the browser URL (2nd screen) and closes the browser window. 
>
>  
>
> Next time, now user directly wants to navigate to the 2nd screen without 
> repeating the work done on 1st screen. We want to store the state of 
> 2ndscreen somehow on browser. If this screen launches, all Next and Previous 
> button should also work properly.
>
>  
>
> Is this requirement achievable, if yes then which GWT APIs provides this 
> feature? Please advice.
>

-- 
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/-/l941gDIxsWIJ.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: nullMethod and performances

2012-08-02 Thread Paul Stockley
GWT preserves the JAVA semantics of statics i.e. they are initialized on 
first access. This is achieved by calls to $clinit_.. methods that do the 
initialization. Within the body of these $clinit  functions, once 
initialization is complete,  they assign the nullMethod function to 
themselves. So the next time the $clinit method is called, the do nothing 
function is called.

So if this is a significant problem, avoid using statics.



On Thursday, August 2, 2012 3:40:04 AM UTC-4, Harold wrote:
>
> Hi all, 
>
> I have noticed that with firefox almost 8% of the runtime time is in 
> nullMethod function.
>
> What does mean this nullMethod and what does generate calls to it ?
>
> Thanks for your attention.
>
> Regards,
> Harold
>

-- 
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/-/aN0GeISqs5kJ.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: DevMode for Firefox 14

2012-07-23 Thread Paul Stockley
Better devmode for chrome will be super devmode. I think the current plugin 
issue is a chrome bug that they seem to have no interest in fixing.

On Monday, July 23, 2012 11:37:42 AM UTC-4, El Mentecato Mayor wrote:
>
> Many thanks to Allan!
>
>
> ALL: Please star this issue:
>
>
> https://code.google.com/p/chromium/issues/detail?id=138557&thanks=138557&ts=1343057729
>
> it might help to have better support for GWT devmode development (GWT 
> plugin) for Chrome, and we can forget about firefox.
>
>
>
> On Monday, July 23, 2012 8:02:49 AM UTC-4, P.G.Taboada wrote:
>>
>> Thank you for jumping in and building the plugins. Do you know if someone 
>> else "from the team" will jump in? Just curious...
>>
>> I know I am a slightly off-topic here, I just don't want to start another 
>> thread.
>>
>> It might be that OSX users, especially Safari users don't have a big 
>> end-user market share. I have no hard data, but I would not agree it's the 
>> same when it comes down to the developers. Since Safari 5.1 we can't use it 
>> anymore (Omniweb sucks) and Chrome is not an option (way too slow). We are 
>> stuck with Firefox. 
>>
>> Is there any plan to get the situation on OSX any better? At least make 
>> Chome DevMode usable?
>>
>> brgds
>>
>> Papick
>>
>>
>> On Wednesday, July 18, 2012 2:08:06 AM UTC+2, Alan Leung wrote:
>>>
>>> While I am technically no longer on the team, I got curious and started 
>>> looking at the FF14 changes.
>>>
>>> There were some slight changes in the JS Object layout again but they 
>>> seem easy enough to fix.
>>>
>>> I have built it for Linux 32 bit: http://acleung.com/ff14-linux32.xpi
>>>
>>> -Alan
>>>
>>

-- 
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/-/3Gb59ogcVbsJ.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: NULL Points + Fire Fox

2012-07-16 Thread Paul Stockley
I can tell you that if you are working in anyway with JSO objects, devmode 
will mask out null pointer exceptions. Maybe this is related. The problem 
has to do with the JS method devmode uses to execute the JSNI code in the 
browser. The stupid JS spec says if an object is null just do nothing, When 
executing the JS for real this method isn't used and you get an error.

On Monday, July 16, 2012 8:47:29 PM UTC-4, Sean wrote:
>
> So I made a bone head mistake and had a null pointer error. essentially I 
> had
>
> user = loadUser();
>
> if( user == null)
> {
>Make login screen
> }
> else{
>   populate user
> } 
>
> if(user.name == Sean)
> {
>do something
> }
>
> So obviously that nulls out if I'm not logged in. Here's the rub, it 
> worked fine in development mode. It didn't toss an error or anything. When 
> I deployed it, I was met with no errors, only a blank screen. However, 
> Firefox worked fine. This took me HOURS to figure out. 
>
> Any idea why it works in dev mode and FireFox? I wish it stopped working 
> ASAP (like it should) so I know, Oh, that line I just put in made it stop 
> working instead of it happening hours later when I'm deploying it. 
>
>

-- 
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/-/2crD0bSMWkwJ.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: SuperDevMode compile time

2012-07-11 Thread Paul Stockley
I think I remember reading that there may be a problem with some of the 
generators running all the time (rpc and client bundle) even if nothing has 
changed. That could be causing some projects to be slow. Also ray mentioned 
that the linking phase was taking longer then he expected in some cases. I 
think there will be some fine tuning required.

On Wednesday, July 11, 2012 10:10:18 AM UTC-4, Marius Grama wrote:
>
> On the application I am working, for the gwt draft compile (via "Dev mode 
> on" bookmarklet) CodeServer takes about 30-45 seconds.
> The draft compile from Eclipse with GWT compile for one browser with 
> -draftCompile argument takes ~70 seconds.
>
> As I've read on this blog post 
> http://tbroyer.posterous.com/how-does-gwts-super-dev-mode-work which explains 
> how GWT Superdevmode works, the compilation should take *under 10 seconds*
> .
>
> I'd like to ask some opinions on how much it takes the compile time for 
> other developers who work with GWT Superdevmode on their applications. Does 
> it run under 10 seconds for you?
>
> Also when the draft compilation takes 30-40 seconds, I am still happy with 
> the results, because it works much faster as with GWT Eclipse Devmode 
> Plugin, but maybe I have misconfigured something in my application and this 
> is why the compile takes so long.
>

-- 
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/-/iZ2O0-G5xq0J.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: Elemental in GWT 2.5 is what?

2012-07-10 Thread Paul Stockley
Elemental really is two things. Firstly,  a set of collections that have 
very little overhead compared to the java emulated classes. They are 
created based on JSO objects and are about as performant as you can get. 
Secondly, a generated set of JSO mappings to ALL webkit/chrome exposed 
javascript api's. These are not hand created like the rest of GWT. Instead 
they are created by a python script that runs against the browser IDL 
defined interfaces. So elemental can be kept up to date with the bleeding 
edge of the web more easily.  

So you are asking what the point of this is? If you want maximum performing 
collections then you can use the new ones provided in elemental. If you 
want to write a GWT program with the minimum possible footprint then using 
the JSO elemental bindings will provide this. In addition, if you want to 
access some part of the browser api not covered by GWT then elemental will 
provide a way to do that. It is mainly targeted for writing code for modern 
html 5 browsers. I think the idea is to make it a bit more general than 
webkit/chrome in the future. 


On Monday, July 9, 2012 6:34:13 PM UTC-4, mp31415 wrote:
>
> I'm trying to make some sense from that Elemental feature. But I'm 
> definitely missing something. On 2.5 main page there is a link to a brief 
> article about Elemental which really does not add much. GWT team is 
> notoriously bad on documentation side and it's not getting any better. Just 
> please don't tell me to shut up and use something else. It's impossible to 
> see the big picture without some background information, like what was 
> missing before, what real purpose of the feature is. It's very nice that we 
> can now call some latest API but what about the more trivial stuff that say 
>  UiBinder was in charge so far? Or maybe it is not about UI but more about 
> better hiding JSO types? Or something totally different at all?
>
> It's not any better with all other features in fact, but right now my 
> gripe is about Elemental. 
>
> I looked at the Collide project code. They reference elemental.* packages 
> all over the place and elemental classes carry copyright statement from 
> 2010. So is it new or just recently opened by Google?
>
> I mean we get some random pieces of information from GWT team which I have 
> a hard time stitching together.
> And I didn't download yet 2.5 RC, as I prefer to understand things first, 
> before diving into some low-level details.
>
> Thanks.
>

-- 
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/-/zo9D8bBCrxsJ.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: How far does the optimizations of the GWT compiler go..?

2012-06-21 Thread Paul Stockley
Story of your compile. Do a google search.

On Thursday, June 21, 2012 4:59:09 PM UTC-4, Carsten wrote:
>
> Interesting. What means soyc?
>
> On Thursday, June 21, 2012 10:41:54 PM UTC+2, Paul Stockley wrote:
>>
>> Yes it will remove methods and classes that are not used. If you compile 
>> with the option -compileReport it will generate a soyc report that shows 
>> you all the code that is included in your project.
>>
>> On Thursday, June 21, 2012 4:17:53 PM UTC-4, Carsten wrote:
>>>
>>> Hi,
>>>
>>> I was wondering how well the GWT compiler is able to remove unused 
>>> parts? Can it even remove methods and fields from a class which are never 
>>> used?
>>>
>>> Example:
>>>
>>> VeryComplexObject vco = null;
>>>
>>> initVCO() {
>>> ...
>>> };
>>>
>>> If initVCO is never called from my code, will the GWT compiler remove 
>>> the method initVCO(), the field vco, or even the VeryComplexObject class 
>>> itself?
>>>
>>> Can I somehow check what the GWT compiler removed and what not? Is there 
>>> a log which lists removed parts?
>>>
>>> Thanks,
>>> Carsten
>>>
>>

-- 
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/-/1IWdg8dzmy0J.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: How far does the optimizations of the GWT compiler go..?

2012-06-21 Thread Paul Stockley
Yes it will remove methods and classes that are not used. If you compile 
with the option -compileReport it will generate a soyc report that shows 
you all the code that is included in your project.

On Thursday, June 21, 2012 4:17:53 PM UTC-4, Carsten wrote:
>
> Hi,
>
> I was wondering how well the GWT compiler is able to remove unused parts? 
> Can it even remove methods and fields from a class which are never used?
>
> Example:
>
> VeryComplexObject vco = null;
>
> initVCO() {
> ...
> };
>
> If initVCO is never called from my code, will the GWT compiler remove the 
> method initVCO(), the field vco, or even the VeryComplexObject class itself?
>
> Can I somehow check what the GWT compiler removed and what not? Is there a 
> log which lists removed parts?
>
> Thanks,
> Carsten
>

-- 
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/-/b5ni_b6w0hwJ.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: Issue Reloading Frame

2012-06-14 Thread Paul Stockley
You can use some JSNI to do this. Create a method such as 

protected native void reloadIFrame(Element iframeEl) /*-{
iframeEl.contentWindow.location.reload(true);
}-*/;

 Then call it with your iFrame element

On Thursday, June 14, 2012 10:17:26 AM UTC-4, Thomas Mancini wrote:
>
> All,
>
> I am currently working on a GWT project where I am displaying an HTML file 
> within an iframe in my application.  This HTML file is actually being 
> written to as it is getting displayed, and I am hoping to be able to reload 
> the frame so that the changes made to the HTML file are reflected on 
> screen.  I am able to do this two different ways that both work when 
> running in development mode, however neither seem to work when the project 
> is deployed.
>
> The first method I tried was setting the frame's URL to itself: 
> frame.setUrl(frame.getUrl());
>
> The second method I tried using JSNI:
>
> public native void refresh() /*-{
> if($doc.getElementById('__reportFrame') != null) {
>   $doc.getElementById('__reportFrame').src = 
> $doc.getElementById('__reportFrame').src;
> }
>   }-*/;
>
> When deployed, the frame gets displayed in a Window, and when the file is 
> finished being written to, a call to either of these refresh methods is 
> made, and the frame refreshes to contain the finished HTML file.  When I am 
> deployed, the call to the refresh does not reload the contents of the 
> frame, however if I bring up the frame's context menu (in Firefox), then go 
> into This Frame, and click reload, it successfully reloads the frame to 
> contain the finished HTML file.  I have tested this on multiple versions of 
> Firefox without any luck.
>
> Does anyone have any suggestions?  Why would the behavior be different 
> from one mode to the other?
>
> Thanks.
>

-- 
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/-/A7YodHhrMdAJ.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: gwt compiled code creates empty body functions

2012-05-10 Thread Paul Stockley
This is normal, there is nothing you can do to avoid them. There was talk 
about optimizing the output to avoid these.

On Thursday, May 10, 2012 2:16:21 AM UTC-4, alexeb112 wrote:
>
> Hi im not sure if this is why to post this but ill try anyway. So I 
> noticed in the javascript code that GWT compiles to there are a bunch of 
> just empty functions, in my latest compile there are 1287 empty functions. 
> I was wondering if there was a way to fix this? 
> It seems like GWT should't be doing this. Here are some examples of the 
> functions that I am talking about:
> function Gc(){}
> function Kc(){}
> function Oc(){}
> function Sc(){}
> function Yc(){}
> function dd(){}
> function id(){}
> function md(){}
> function rd(){}
> function qd(){}
> function Fd(){}
> function Jd(){}
>
> Could this be a bug or is there something that I could have done to cause 
> this that I should avoid?
>
> Thanks
>

-- 
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/-/ca_P59-R1qwJ.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: Updated Information on JsonpRequestBuilder and Javascript Overlay objects

2012-05-07 Thread Paul Stockley
What kind of type is List? Typically JSO's only support JsArray<> for 
arrays of JSO's

On Monday, May 7, 2012 2:51:13 PM UTC-4, Christopher Piggott wrote:
>
> Hi,
>
> What's the current state of javascript overlay objects and 
> JsonpRequestBuilder?  Should the same code work both in deployed (running 
> on a web server) as well as  debug / development mode?
>
> I'm running into issues with runtime exceptions, and the whole thing is a 
> bit murky to me.  The jsonp "object" that I'm returning is actually nested:
>
> public class SensorList extends JavaScriptObject {
> protected SensorList() { }
> public final native List getSensorList() /*-{ return 
> this.sensorList; } -*/
> }
>
> public class Sensor extends JavaScriptObject {
> protected Sensor() { }
> public final native List getSensorName() /*-{ return 
> this.sensorName; } -*/
> /* other properties ... */
> }
>
> I just can't seem to make this work with:
>
> builder.requestObject(url,
> new AsyncCallback() {
> public void onSuccess(SensorList 
> sList) { ... }
> }
>
> I either get the no such method  problem or if I try to fix that by 
> adding interfaces I get class cast exceptions.
>
> Very confusing.
>
> --Chris
>
>
>

-- 
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/-/Rg08o9ywCVQJ.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: Google axing GWT?

2012-04-27 Thread Paul Stockley
It looks like the GWT guys who left to go to new startups are still using 
GWT. This bodes well for future support even if Google isn't directly 
involved anymore.

On Friday, April 27, 2012 4:19:47 PM UTC-4, Daniel Mauricio Patino León 
wrote:
>
> I think GWT its a very good open source project. We use it to develop RIA 
> and we love it. Like  Joseph i'll pray to google make it better and improve 
> it.
> What about a thread where people +1 if want that google keep working on 
> it? there  exist one?
>
> Greetings from Mexico.
>
> El 27 de abril de 2012 15:12, Steve  escribió:
>
>> https://plus.google.com/110412141990454266397/posts/8nmmgp4AChM
>>
>> Enjoy.
>>
>> On Apr 27, 3:26 pm, Mauro Oliveira  wrote:
>> > +1
>> >
>> > On 27 April 2012 14:11, Joseph Lust  wrote:
>> >
>> >
>> >
>> >
>> >
>> >
>> >
>> > > I'll keep praying for GWT. Let's see what transpires at Google IO in 
>> June.
>> >
>> > > Joe
>> >
>> > > --
>> > > 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/-/VrsH8tPIQs4J.
>> > > To post to this group, send email to 
>> google-web-toolkit@googlegroups.com.
>> > > To unsubscribe from this group, send email to
>> > > google-web-toolkit+unsubscr...@googlegroups.com.
>> > > For more options, visit this group at
>> > >http://groups.google.com/group/google-web-toolkit?hl=en.
>>
>> --
>> You received this message because you are subscribed to the Google Groups 
>> "Google Web Toolkit" group.
>> To post to this group, send email to google-web-toolkit@googlegroups.com.
>> To unsubscribe from this group, send email to 
>> google-web-toolkit+unsubscr...@googlegroups.com.
>> For more options, visit this group at 
>> http://groups.google.com/group/google-web-toolkit?hl=en.
>>
>>
>
>
> -- 
> ISC. Daniel Mauricio Patiño León.
> Director ejecutivo
> Liondev S.A. de C.V.
>
>
>
> 

-- 
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/-/p6dWSYv-PsYJ.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: GWT Performance : Good or Bad ?

2012-03-27 Thread Paul Stockley
Seems this whole thread has more to do with GXT than GWT. We have built a 
large app, part of which runs on the ipad as a fullscreen web app and 
performance isn't a problem at all. We built most of our widgets ourself to 
be very efficient and we make use of HTMLPanels and raw html where it makes 
sense.

On Tuesday, March 27, 2012 6:51:45 PM UTC-4, Joseph Lust wrote:
>
> My company just completed a very large intranet UI using GXT. The overall 
> lesson learned was *don't use GWT*. For the most part it was much slower 
> and the model used in GXT did not extend well to our MVP setup. Perhaps GXT 
> 3 has fixed some of these issues, but we don't want to deploy a framework 
> that's still in beta.
>
> Sincerely,
> Joe
>

-- 
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/-/x-mIdfV0xAEJ.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: Defining a Jetty realm in hosted mode

2012-03-21 Thread Paul Stockley
Create a jetty-web.xml file under your war/WEB-INF folder 

Mine is defined as follows 

 
http://jetty.mortbay.org/configure.dtd";> 
 
 
  
  
default
c:\ocs\jettyusers.properties
  

 
 

my jettyusers.properties file contains the username, password and roles for 
each user e.g.

pstockley: test, nirvana_tester

-- 
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/-/hWgPbLWhDPMJ.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: GWT support for Safari on Windows

2012-03-16 Thread Paul Stockley
Devmode on safari is only supported when using a mac.

On Friday, March 16, 2012 10:24:21 AM UTC-4, jsg wrote:
>
> I have just used the workaround for issue 6601 , but running Safari 4.0.5 
> or less than 5.1 does not result in an installable version for GWT-plugin 
> for Windows.
>
> On Friday, 16 March 2012 15:40:18 UTC+2, Patrick Tucker wrote:
>>
>> Or here?:
>> http://code.google.com/p/google-web-toolkit/issues/detail?id=5341
>>
>> On Thursday, March 15, 2012 9:08:28 AM UTC-4, jsg wrote:
>>
>>> Hello,
>>>
>>> I'm developing a mgwt  application for 
>>> iPads. I'm doing the development on Windows and Safari offers the best 
>>> testing environment to match the iPad browser renderer.
>>> Despite the fact that Chrome uses webkit like Safari, the experience is 
>>> very different and there are issues that result in panels being obscured by 
>>> other panels.
>>>
>>> I know this because of the compiled gwt code works perfectly in Safari, 
>>> however obviously I can't debug in hosted-mode which is a pain.
>>>
>>> Are there any plans to make GWT-plugin available for Safari on Windows?
>>>
>>> Regards,
>>> Julian
>>>
>>

-- 
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/-/j77EfZHosicJ.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: CssResource @def in UiBinder

2012-02-14 Thread Paul Stockley
A somewhat convoluted way of doing this is as follows. The resulting 
javascript code is actually very good and 99% of the time just the string 
literal for the def will be included.

@def COLOR_ONE #3B5998; 
@def COLOR_TWO #DFE4EE; 
@def COLOR_THREE #FF; 
@def COLOR_FOUR #6792AB; 
@def COLOR_FIVE #00; 

CommonBundle 

package com.somepackage

public interface CommonBundle extends ClientBundle { 

@Source("definitions.css") 
Definitions definitions(); 

@Shared 
public interface Definitions extends CssResource { 
String COLOR_ONE(); 
String COLOR_TWO(); 
String COLOR_THREE(); 
String COLOR_FOUR(); 
String COLOR_FIVE(); 
}
 public static final CommonBundle INSTANCE = 
 GWT.create(CommonBundle.class);
public static final Definitions CSS = INSTANCE.css();
} 

 UiBinder 


@eval COLOR_THREE com.somepackage.CommonBundle.CSS.COLOR_THREE();

  .outerLabel { 
color: COLOR_THREE; 
} 
 

-- 
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/-/Ma2mfE2DX4oJ.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: image can show in debug mode, but not when deloyed to weblogic

2012-02-10 Thread Paul Stockley
Remove the initial '/' i.e.  "Images/abc.png"

There is a difference in the way devmode treats context paths.

-- 
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/-/1cLNu_jN7PcJ.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: Custom widget with custom UiBinder markup

2012-02-03 Thread Paul Stockley
Add two methods

@UiChild
public void addLeft(Widget w) {...}

@UiChild
public void addRight(Widget w) {..}

Then make sure you widget implements HasWidgets or similar.

In your uibinder you can now use


 

  

 



 

 

-- 
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/-/pkucQe-mMbwJ.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: Overriding processCall to intercept RPC calls

2012-01-03 Thread Paul Stockley
In your service interface you have do declare each function throws your 
custom exception otherwise you will get that error.

-- 
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/-/KuhUBhSNs6wJ.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Closure compiler integration

2011-12-22 Thread Paul Stockley
I can see there is some work going on to integrate the closure compiler as 
a back end to the GWT compiler. Apparently this can give a 20% code 
reduction. I am curious why such a big decrease. GWT and the closure 
compiler seem to do very similar optimizations so why is the closure 
compiler so much better? 

-- 
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/-/z6L0mOMIBi4J.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: Poor quality code produced by uiBinder when using CSSResources

2011-12-20 Thread Paul Stockley
That isn't the case, I can tell a measurable difference. This change was 
introduced when uiBinder switched to use SafeHTMLTemplates. You can use the 
following to disable its use



In a more extreme example, I was using a SafeHTMLTemplates to build a 
complex list and just the class names resulted in 1000 extra 
string concatenations. This resulted in easily a second delay. When you are 
trying to build web apps that are as responsive as native apps this is 
unacceptable. The fix was to abandon the template and build the string 
myself and just escape the fields that contained data from the server.

-- 
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/-/uXKKN2H90Y4J.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



  1   2   3   >