Re: attach listeners/handlers to widget, then do some DOM-stuff - listeners gone?

2011-11-26 Thread Vitrums
I frequently use native .onmouseover/.onmouseout events in my animations, 
and I always try to follow some limitations, which can save me from a set 
of known unpredictable behaviours concerning this matter. First of all, 
defer all your handlers attachments as much, as you're sure, that calling a 
constructor will already have the correct getAbsoluteLeft() method call 
results at this point. Second thing is that, when you process these two 
events to enable/disable some UI effects for smoothness purposes have some 
default pauses to determine whether it's still necessary to call the 
mirrored animation, or it was just a micro-break like one, when you move a 
mouse from one element of ul list to another, while this list is attached 
to the listened DOM element. Also think about using Cell... objects as a 
possible substitutions for old-school Widget ones. 

-- 
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/-/hogg6m8hWHoJ.
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 e IDE

2011-11-26 Thread Maximilian Eberl
 Hi, I wanted to know if there is a RAD framework for GWT NetBeans IDE,
 like Eclipse?

There is an intereseting site on the internet which can help You.
It's name is 'Google'

http://www.google.com

You should type 'netbeans gwt plugin' into the textField in the middle
of their homepage. After some magic it will take You (for example) to:

http://java.net/projects/gwt4nb/pages/Home

Or look her: http://justfuckinggoogleit.com/

-- 
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.



Re: Reusing widgets across mvp views

2011-11-26 Thread Maximilian Eberl
 I am attempting to share widgets across various views in mvp.

Just a simple idea:
Create a Singleton class WidgetHolder and keep the Widgets in a
HashMap or an Array List and provide a get(widgetname) method.
Remember that client-side GWT is JavaScript, not Java!!
So Your WidgetHolder should fit into JavaScript's model of programming.

-- 
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.



Re: GWT Designer Local archive

2011-11-26 Thread Eric Clayberg (Google)
GPE includes GWT Designer.

The Android feature requires that you install the Android tools (ADT) first.

-- 
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/-/GsnyorWBeqkJ.
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 e IDE

2011-11-26 Thread Eric Clayberg (Google)
Also note that the GPE (and tools like GWT Designer) are Eclipse only.

-- 
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/-/MzCO48RyX30J.
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.



MVP framework(s) doubt

2011-11-26 Thread vehdra music
I am creating a GWT application using GWT MVP as described here
( 
http://code.google.com/webtoolkit/doc/latest/DevGuideMvpActivitiesAndPlaces.html
) only that instead of ClientFactory I am using Gin.

I started nice, but now that I have many entities with List  Edit
views, activities and places, my project is growing a lot and I having
perfomance issues.

I know about code splitting, but I care about is, is performant to
have for example a EditPlace, ListPlace, EditActivity  ListActivity
for  every model that I need to work in my app? For example, if I only
have Foo model I will have:

FooEditPlace
FooEditActivity
FooEditView
FooEditViewImpl
FooEditView.ui.xml

FooListPlace
FooListActivity
FooListView
FooListViewImpl
FooListView.ui.xml

Ten files for only editing / listing one model :) And I have to edit /
list about 17 models in my app right now...

I don't know if I doing the things in the right way. Is it normally
to have many files in a big GWT project using the GWT Activities 
Places fw?

OTOS I was looking to another frameworks like gwtp, mvp4g, guit, every
one seems to be nice and have cool features, but I believe (just
believe, I didn't try anyone of this fw yet) that they are reinvent
the wheel. Or I am wrong and I can take avantage of using one of this
fw in my app?

What are you experiences? Am I doing wrong in the Activities 
Places way? Am I using it right and I just have to use code spliting
to have better performance? Or should I use gwtp, mvp4g or guit?

Thanks in advance ;)

-- 
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.



Re: MVP framework(s) doubt

2011-11-26 Thread Travis Camechis
I have used GWTP a project I worked on and loved it.  It doesn't require
all the boiler plate code that you have to write use the
ActivitiesAndPlaces model.

On Sat, Nov 26, 2011 at 10:42 AM, vehdra music veh...@gmail.com wrote:

 I am creating a GWT application using GWT MVP as described here
 (
 http://code.google.com/webtoolkit/doc/latest/DevGuideMvpActivitiesAndPlaces.html
 ) only that instead of ClientFactory I am using Gin.

 I started nice, but now that I have many entities with List  Edit
 views, activities and places, my project is growing a lot and I having
 perfomance issues.

 I know about code splitting, but I care about is, is performant to
 have for example a EditPlace, ListPlace, EditActivity  ListActivity
 for  every model that I need to work in my app? For example, if I only
 have Foo model I will have:

 FooEditPlace
 FooEditActivity
 FooEditView
 FooEditViewImpl
 FooEditView.ui.xml

 FooListPlace
 FooListActivity
 FooListView
 FooListViewImpl
 FooListView.ui.xml

 Ten files for only editing / listing one model :) And I have to edit /
 list about 17 models in my app right now...

 I don't know if I doing the things in the right way. Is it normally
 to have many files in a big GWT project using the GWT Activities 
 Places fw?

 OTOS I was looking to another frameworks like gwtp, mvp4g, guit, every
 one seems to be nice and have cool features, but I believe (just
 believe, I didn't try anyone of this fw yet) that they are reinvent
 the wheel. Or I am wrong and I can take avantage of using one of this
 fw in my app?

 What are you experiences? Am I doing wrong in the Activities 
 Places way? Am I using it right and I just have to use code spliting
 to have better performance? Or should I use gwtp, mvp4g or guit?

 Thanks in advance ;)

 --
 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.



-- 
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.



Re: MVP framework(s) doubt

2011-11-26 Thread Christian Goudreau
I've used activities and places are great tools, not a framework in
itself. It can be used for mvp, but doesn't has to. What is missing with
activity and places is a framework like Gwtp that remove all the boiler
plate from it :D

That being said, I would suggest using gwtp (since I'm one of the owner and
dedicated to it). I never used mvp4g, but I know Pierre-Laurent and he's
really active and dedicated to his project. Guit is also a really good
framework, there's a lot of magic behind it that remove a lot of boiler
plate, even more than it Gwtp and mvp4g.

Gwtp community is really active and you'll get a lot of help from the
members, my company is also offering consulting and development services on
top of gwt and gwtp and is dedicated to support Gwtp for businesses that
need long term involvement in the project.

By the way, Gwtp, mvp4g and guit doesn't reinvent the wheel, they existed
long before Activities and places :D And as for Gwtp, next version is
focused toward better integration with Activities and places.

Cheers,

On Sat, Nov 26, 2011 at 10:56 AM, Travis Camechis camec...@gmail.comwrote:

 I have used GWTP a project I worked on and loved it.  It doesn't require
 all the boiler plate code that you have to write use the
 ActivitiesAndPlaces model.


 On Sat, Nov 26, 2011 at 10:42 AM, vehdra music veh...@gmail.com wrote:

 I am creating a GWT application using GWT MVP as described here
 (
 http://code.google.com/webtoolkit/doc/latest/DevGuideMvpActivitiesAndPlaces.html
 ) only that instead of ClientFactory I am using Gin.

 I started nice, but now that I have many entities with List  Edit
 views, activities and places, my project is growing a lot and I having
 perfomance issues.

 I know about code splitting, but I care about is, is performant to
 have for example a EditPlace, ListPlace, EditActivity  ListActivity
 for  every model that I need to work in my app? For example, if I only
 have Foo model I will have:

 FooEditPlace
 FooEditActivity
 FooEditView
 FooEditViewImpl
 FooEditView.ui.xml

 FooListPlace
 FooListActivity
 FooListView
 FooListViewImpl
 FooListView.ui.xml

 Ten files for only editing / listing one model :) And I have to edit /
 list about 17 models in my app right now...

 I don't know if I doing the things in the right way. Is it normally
 to have many files in a big GWT project using the GWT Activities 
 Places fw?

 OTOS I was looking to another frameworks like gwtp, mvp4g, guit, every
 one seems to be nice and have cool features, but I believe (just
 believe, I didn't try anyone of this fw yet) that they are reinvent
 the wheel. Or I am wrong and I can take avantage of using one of this
 fw in my app?

 What are you experiences? Am I doing wrong in the Activities 
 Places way? Am I using it right and I just have to use code spliting
 to have better performance? Or should I use gwtp, mvp4g or guit?

 Thanks in advance ;)

 --
 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.


  --
 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.




-- 
Christian Goudreau
www.arcbees.com

-- 
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.



Re: MVP framework(s) doubt

2011-11-26 Thread Thomas Broyer
What are your perf issues? Are they in DevMode or production mode? If you 
don't have perf issues in prod mode, then you don't have a perf issue: 
DevMode *is* slower; and moreover code splitting won't help.
It's also important to define *which* are your perf issues: if it's 
download time, then code splitting can help, if it's about runtime 
performance, then it won't, and you'll have to find the bottleneck.
Having a lot of classes can be the problem, but I highly doubt it is.
We do have thousands of classes, and we use RequestFactory and the Editor 
framework, which generate a whole lot more, and we haven't had any negative 
feedback (yet) about performance.

If you want to reduce the number of files you have, then you can cut the 
number of places by using, say an EditPlace with a field telling which kind 
of entity is being edited, of a FooPlace with a field telling which 
action is being done on the Foo entity (edit, list, etc.) But I doubt 
it'll change much things about performance (and unless you measure it and 
determine it's your bottleneck, it's not worth trying to fix it).

So, first, if you have a perf issue, measure and determine where it comes 
from (you can use SpeedTracer in Chrome, or any browser's profiling tool; 
possibly after compiling in -style PRETTY so the code is readable, even if 
less optimized; you can also use the Duration class and some logging, using 
GWT.log() in DevMode or java.util.logging), then fix it. But without 
*knowing* (not only guessing, knowing!) what your perf issue is, it's 
likely you won't fix it just by trying a few things (and you could even 
make it worth, if you guessed wrong).

Also, keep in mind that any framework that cuts boilerplate down uses 
code generation, so you might have fewer classes in your code, it doesn't 
mean there'll be less in the end (only the compileReport will tell you).

Generally, bottlenecks are: DOM manipulations (misuse or overuse of 
widgets; switch to HTMLPanel and CSS for layout if possible, use Cell 
widgets for lists/tables/trees), and RPC (GWT-RPC or RequestFactory, or 
whatever; serialization is generally the culprit); and of course 
server-side code (database, etc.)

-- 
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/-/mEBQVZW8mQgJ.
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 Designer Local archive

2011-11-26 Thread tHr
Thanks
How can I download GWT Documents?

-- 
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/-/FK7_fj9uh-IJ.
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.



Simple OpenID web app example

2011-11-26 Thread Clever Ruse
Hello

I've been trying to create a simple web app that uses OpenID... I've
tried to follow this guide:
http://code.google.com/appengine/articles/openid.html

Let me say that I have very little knowledge. I would really
appreciate help doing a super simple web app.

I've followed this guide as well as I've understood it. But it won't
work. I've done exactly what the guide explicitly tells you to do and
nothing more. For example I guess something needs to be done on the
client that the guide doesn't explicitly state.

The easiest way to help me would be to write down a list of steps,
starting from a blank project, on what needs to be done to have a
rudimentary app using openid.

Step 1: Create a New web application project in Eclipse.
Step 2: Do this.
Step 3: Do that.

...and so on

-- 
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.



Ideal development platform for GWT/GAE?

2011-11-26 Thread Mark Molloy
Hi, I currently have one laptop (Windows 7 64-bit) that I use for
everything -- and that's a lot of #^%.  It is an operational mess.
Now, I've installed MyEclipse 9.0 to develop a GWT/GAE application.
Unfortunately, whenever Eclipse is running, the browsers start timing
out.  E.g., it is impossible to use gmail. :(  Performance of Eclipse
is pretty erratic, too.

I'm thinking that I should get a machine dedicated to development/
testing of my GWT/GAE application. I just want to install Java,
Eclipse, and the plugins I need for the app.

What do people in this group recommend? I want a minimum of
operational maintenance, reasonable performance, and consistent it
just works behavior, in place of the constant hanging, re-installing,
head-scratching operational frustration I currently experience. I'd
like to be able to spend my productive time coding and testing
algorithms, not trying to figure out why the layers of software
underneath don't work.

Thanks in advance for your help!

-Mark

-- 
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.



Smart GWT, GWT Designer No Java Server

2011-11-26 Thread Fabe
Hi,

I want to know if and how I could use the GWT Designer (via a GWT Java
Project) with Smart GWT and make all of that running finally on a non
Java Server such as Apache 2.

I'm creating a web app based on a _GWT Java Project_ and on the Smart
GWT module. The purpose is to make it running on a non Java Server so.

?

-- 
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.



Loading inherited module 'com.google.gwt.i18n.I18N' and Unexpected error while processing XML

2011-11-26 Thread bognekadje
Hi,

Since yesterday, i have problem to compile my maven project. I use
maven with archetype codehaus.mojo:gwt-maven-plugin.

Compilation return following error message

I don't understand, why this problem start since yesterday and don't
see his causes.
Please help me.


[INFO]
[INFO] --- gwt-maven-plugin:2.4.0:compile (default) @ schoolit ---
[INFO] auto discovered modules [com.architect.schoolit.schoolit]
[INFO] Loading inherited module 'com.google.gwt.xml.XML'
[INFO]Loading inherited module 'com.google.gwt.user.User'
[INFO]   Loading inherited module 'com.google.gwt.i18n.I18N'
[INFO]  [ERROR] Unexpected error while processing XML
[INFO] java.lang.NoClassDefFoundError: com/google/gwt/core/ext/linker/
PropertyProviderGenerator
[INFO]  at java.lang.ClassLoader.defineClass1(Native Method)
[INFO]  at java.lang.ClassLoader.defineClassCond(ClassLoader.java:631)
[INFO]  at java.lang.ClassLoader.defineClass(ClassLoader.java:615)
[INFO]  at
java.security.SecureClassLoader.defineClass(SecureClassLoader.java:
141)
[INFO]  at java.net.URLClassLoader.defineClass(URLClassLoader.java:
283)
[INFO]  at java.net.URLClassLoader.access$000(URLClassLoader.java:58)
[INFO]  at java.net.URLClassLoader$1.run(URLClassLoader.java:197)
[INFO]  at java.security.AccessController.doPrivileged(Native Method)
[INFO]  at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
[INFO]  at sun.misc.Launcher$ExtClassLoader.findClass(Launcher.java:
229)
[INFO]  at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
[INFO]  at java.lang.ClassLoader.loadClass(ClassLoader.java:295)
[INFO]  at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:
301)
[INFO]  at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
[INFO]  at com.google.gwt.dev.cfg.ModuleDefSchema
$ClassAttrCvt.convertToArg(ModuleDefSchema.java:886)
[INFO]  at
com.google.gwt.dev.util.xml.HandlerArgs.convertToArg(HandlerArgs.java:
64)
[INFO]  at
com.google.gwt.dev.util.xml.HandlerMethod.invokeBegin(HandlerMethod.java:
221)
[INFO]  at com.google.gwt.dev.util.xml.ReflectiveParser
$Impl.startElement(ReflectiveParser.java:294)
[INFO]  at
com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.startElement(AbstractSAXParser.java:
501)
[INFO]  at
com.sun.org.apache.xerces.internal.parsers.AbstractXMLDocumentParser.emptyElement(AbstractXMLDocumentParser.java:
179)
[INFO]  at
com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanStartElement(XMLDocumentFragmentScannerImpl.java:
1343)
[INFO]  at
com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl
$FragmentContentDriver.next(XMLDocumentFragmentScannerImpl.java:2756)
[INFO]  at
com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:
648)
[INFO]  at
com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:
511)
[INFO]  at
com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:
808)
[INFO]  at
com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:
737)
[INFO]  at
com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:
119)
[INFO]  at
com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:
1205)
[INFO]  at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl
$JAXPSAXParser.parse(SAXParserImpl.java:522)
[INFO]  at com.google.gwt.dev.util.xml.ReflectiveParser
$Impl.parse(ReflectiveParser.java:347)
[INFO]  at com.google.gwt.dev.util.xml.ReflectiveParser$Impl.access
$200(ReflectiveParser.java:68)
[INFO]  at
com.google.gwt.dev.util.xml.ReflectiveParser.parse(ReflectiveParser.java:
418)
[INFO]  at
com.google.gwt.dev.cfg.ModuleDefLoader.nestedLoad(ModuleDefLoader.java:
296)
[INFO]  at com.google.gwt.dev.cfg.ModuleDefSchema
$BodySchema.__inherits_begin(ModuleDefSchema.java:495)
[INFO]  at sun.reflect.GeneratedMethodAccessor1.invoke(Unknown Source)
[INFO]  at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:
25)
[INFO]  at java.lang.reflect.Method.invoke(Method.java:597)
[INFO]  at
com.google.gwt.dev.util.xml.HandlerMethod.invokeBegin(HandlerMethod.java:
230)
[INFO]  at com.google.gwt.dev.util.xml.ReflectiveParser
$Impl.startElement(ReflectiveParser.java:294)
[INFO]  at
com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.startElement(AbstractSAXParser.java:
501)
[INFO]  at
com.sun.org.apache.xerces.internal.parsers.AbstractXMLDocumentParser.emptyElement(AbstractXMLDocumentParser.java:
179)
[INFO]  at
com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanStartElement(XMLDocumentFragmentScannerImpl.java:
1343)
[INFO]  at
com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl
$FragmentContentDriver.next(XMLDocumentFragmentScannerImpl.java:2756)
[INFO]  at
com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:
648)
[INFO]  at

Re: Reusing widgets across mvp views

2011-11-26 Thread Andrei
Thomas,

You have an interesting idea. I am not sure, however, how much you are
going to win by trying to reuse a single copy of a widget. I have some
very complex widgets in my app, and they render very quickly (I must
add I use plain GWT). If I ever notice a delay, it's caused by loading
data, not rendering of widgets. I also don't think you will get any
reduction in the compile code size - may be a few bytes here and there
- as long as you create your own custom widgets and reuse them
consistently throughout the app. So, unless I miss something, just
define your own custom widgets and use them in your code and in the
Ui:Binder.

Andrei

-- 
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.



[gwt-contrib] Re: Fix for ScrollImplTrident leak (issue1601803)

2011-11-26 Thread t . broyer


http://gwt-code-reviews.appspot.com/1601803/diff/1/user/src/com/google/gwt/user/client/ui/ScrollImpl.java
File user/src/com/google/gwt/user/client/ui/ScrollImpl.java (right):

http://gwt-code-reviews.appspot.com/1601803/diff/1/user/src/com/google/gwt/user/client/ui/ScrollImpl.java#newcode56
user/src/com/google/gwt/user/client/ui/ScrollImpl.java:56:
scrollable.__scrollHandler = scrollHandler;
How about creating static functions (have a look into
com.google.gwt.user.client.impl.DOMImplTrident) that use
window.event.srcElement to get a reference to the scrollableElem? That
way it wouldn't leak and wouldn't need to be uninstalled.
For the container.onresize, one solution could be to set the
scrollableElem as an expando; e.g.

container.__scrollable = scrollable;

And thus use the following from within the resize handler:
var scrollableElem = window.event.srcElement;
scrollableElem = scrollableElem.__scrollable || scrollableElem;

(the event's target can be either the scrollable or the container; the
__scrollable expando references the scrollable from the container)

http://gwt-code-reviews.appspot.com/1601803/

--
http://groups.google.com/group/Google-Web-Toolkit-Contributors


[gwt-contrib] Fix leak in LayoutImplIE6 (issue1601804)

2011-11-26 Thread stephen . haberman

Reviewers: jgw,



Please review this at http://gwt-code-reviews.appspot.com/1601804/

Affected files:
  M user/src/com/google/gwt/layout/client/LayoutImplIE6.java
  M user/src/com/google/gwt/user/client/ui/DeckLayoutPanel.java


Index: user/src/com/google/gwt/layout/client/LayoutImplIE6.java
diff --git a/user/src/com/google/gwt/layout/client/LayoutImplIE6.java  
b/user/src/com/google/gwt/layout/client/LayoutImplIE6.java
index  
8e7513cc4ba9c4fb2fcc9ba6a158cac05a759581..4b7f7020cc994c137796a43f76c63646a279d554  
100644

--- a/user/src/com/google/gwt/layout/client/LayoutImplIE6.java
+++ b/user/src/com/google/gwt/layout/client/LayoutImplIE6.java
@@ -47,6 +47,9 @@ class LayoutImplIE6 extends LayoutImplIE8 {
 styleRuler.getStyle().setPosition(Position.ABSOLUTE);
 styleRuler.getStyle().setLeft(-1, PX);

+// NOTE: this line causes a leak. Not sure why? Maybe a parent having
+// an expando property to a child is not a good idea? (E.g. it ends
+// up that parent.__styleRuler = styleRuler   
parent.appendChild(styleRule))

 parent.appendChild(styleRuler);
 styleRuler.appendChild(styleInner);
 return styleRuler;
@@ -179,6 +182,8 @@ class LayoutImplIE6 extends LayoutImplIE8 {
 removeLayerRefs(parent);
 removeResizeHandler(parent);
 removeUnitChangeHandler(relativeRuler);
+// fixes leak
+setPropertyElement(parent, __styleRuler, null);
   }

   private native void fillParentImpl(Element elem) /*-{
Index: user/src/com/google/gwt/user/client/ui/DeckLayoutPanel.java
diff --git a/user/src/com/google/gwt/user/client/ui/DeckLayoutPanel.java  
b/user/src/com/google/gwt/user/client/ui/DeckLayoutPanel.java
index  
ed83651045d45cb2e766c8627ad41e76cdf167c5..1bc75ece232b6e1c0430039b449b21f21c9a78b3  
100644

--- a/user/src/com/google/gwt/user/client/ui/DeckLayoutPanel.java
+++ b/user/src/com/google/gwt/user/client/ui/DeckLayoutPanel.java
@@ -294,6 +294,18 @@ public class DeckLayoutPanel extends ComplexPanel  
implements AnimatedLayout,

 animate((widget == null) ? 0 : animationDuration);
   }

+  @Override
+  protected void onLoad() {
+super.onLoad();
+layout.onAttach();
+  }
+
+  @Override
+  protected void onUnload() {
+layout.onDetach();
+super.onUnload();
+  }
+
   /**
* Assert that the specified widget is null or a child of this widget.
*


--
http://groups.google.com/group/Google-Web-Toolkit-Contributors


[gwt-contrib] Re: Fix leak in LayoutImplIE6 (issue1601804)

2011-11-26 Thread stephen . haberman

Note that this is just a first pass because technically __styleRule is
set in initParent, not onAttach.

That means if a user merely instantiates a widget that uses Layout, but
doesn't attach/detach it, this __styleRuler cleanup won't be run, so the
leak will still happen.

Instead, the __styleRuler expando should, I think, only be set in
onAttach, so then we can be sure it will be unset in onDetach.

Off the top of my head, I was thinking of changing initParent to
assign the createStyleRuler(parent) result to a field (instead of
directly to the expando), and then only once onAttach is called,
__styleRuler to the field value.

There could be a more elegant solution I'm missing here, but I think
that would do it.

Any suggestions?


http://gwt-code-reviews.appspot.com/1601804/diff/1/user/src/com/google/gwt/layout/client/LayoutImplIE6.java
File user/src/com/google/gwt/layout/client/LayoutImplIE6.java (right):

http://gwt-code-reviews.appspot.com/1601804/diff/1/user/src/com/google/gwt/layout/client/LayoutImplIE6.java#newcode52
user/src/com/google/gwt/layout/client/LayoutImplIE6.java:52: // up that
parent.__styleRuler = styleRuler  parent.appendChild(styleRule))
I'll delete the comment from the final patch; it's just for explaining
this issue.

http://gwt-code-reviews.appspot.com/1601804/diff/1/user/src/com/google/gwt/layout/client/LayoutImplIE6.java#newcode186
user/src/com/google/gwt/layout/client/LayoutImplIE6.java:186:
setPropertyElement(parent, __styleRuler, null);
Will also remove the dummy comment.

http://gwt-code-reviews.appspot.com/1601804/

--
http://groups.google.com/group/Google-Web-Toolkit-Contributors


[gwt-contrib] Re: Fix leak in LayoutImplIE6 (issue1601804)

2011-11-26 Thread stephen . haberman

Also forgot to mention I'll remove the dummy comments from the final
patch; they were just for explanation purposes.

http://gwt-code-reviews.appspot.com/1601804/

--
http://groups.google.com/group/Google-Web-Toolkit-Contributors