Re: What is the most preferred way !!??

2009-02-03 Thread Ajay Garg

Hmm.. I looked at GWT's code, and went all the way upto
http://google-web-toolkit.googlecode.com/svn/javadoc/1.5/com/google/gwt/user/client/ui/FocusWidget.html
code.

Button is a sub-subclass of FocusWidget, and this is what happens.
Whenever a clickListener is added to a Button for the first time,
Event.Click event is sunk in for the newly instantiated Button
instance, and the clickListener added to ClickListenerCollection.
Next, whenever an onBrowserEvent(Event event) method is triggered, the
onClick() method is called for each of the clickListener registered in
ClickListenerCollection.

So, as far as managing a large number of ClickListeners goes, if we go
by using EButton, the number of ClickListeners is equal to the number
of anonymous abstract classes made out of EButton.

I think a more thinking point would be to consider public void
sinkEvents(int eventBitsToAdd) method of UIObject class, which
happens to be a superclass of FocusWidget. This method is called
whenever a ClickListener is added to an instance for the first time.
Thus, it does not matter whether the ClickListener interface being
added is the same reference as the anonymous abstract class of
Ebutton, or a central wrapper ClickListener (per component, as is
being talked about).

Thus, in a nutshell, if we create an anonyous abstract class of
EButton :

1. We ensure tight coupling, in the sense that the widget, and its
action-on-click are bound together.

2. Since we do not require any external ClickListener (remember that
EButton is a clickListener to itself), memory leak is not a problem;
whenever the anonymous instance goes out of scope, that is the end. In
other words, there is no chance of a dangling reference in the
WrapperWidget's onClick method.

3. There is no extra overhead of maintaining any extra ClickListener
references, as the number of ClickListener references is equal to the
number of anonymous instances.


Your thoughts ..??


On Feb 2, 11:17 pm, gregor greg.power...@googlemail.com wrote:
  This case requires one class ( anonymous extended EButton) creation.

  Your thoughts ..??

 Yes, but you are not reducing the number of event listeners by doing
 this. Each button is now itself a separate click event listener. So I
 don't think this answers the warning given in the link about large
 numbers of event listeners. Also I doubt if there would be much
 material difference if any in the javascript generated between your
 EButton and a normal Button with an anonymous ClickListener, or none
 that would have any effect on performance anyway - you can always
 compile with -PRETTY and check.
--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



MY Grid's page toolbar is not working properly

2009-02-03 Thread shajeer kt
Dear all,

  I created a grid that can access the database.Data loading is working
perfect.
 Supose there are 100 data that is loaded from the data base my grid is
displaying 100 items even after giving PagingToolbar.setPagesize(15)..

It shud display the first 15 in the first oage,Second 15 in the second page
ike thatBut it is displaying the whole 100 itemsDue to this i want
to scroll down the grid for viewing the whole item..

Please any one give me a solution for this.

--~--~-~--~~~---~--~~
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: Check whether browser is supported

2009-02-03 Thread Danny Schimke
I forgot: I can use the noscript- tag in the html- sourcefile... That
should work... I reply again to tell if everything worked well

-Danny

2009/2/3 Danny Schimke schimk...@googlemail.com

 This was helpful. But is there a way to keep out browsers which does 
 *not*support javascript like the W3M browser? The gwt:onLoadErrorFn- content
 have to be a javascript-function(?), but can I load a simple HTML page
 instead without using javascript?

 2009/2/3 Joe Cole profilercorporat...@gmail.com


 See this thread. We use this and it works well.


 http://groups.google.com/group/Google-Web-Toolkit/browse_thread/thread/41ce4b44e0d4e262/abd93affd092bb47?lnk=gstq=profilercorporation#abd93affd092bb47

 On Feb 3, 11:32 pm, Danny Schimke schimk...@googlemail.com wrote:
  Is there an easy way to check whether GWT supports a browser, for
 example in
  EntryPoint to tell the user, that the Browser is not supported? We've
 got a
  empty site if we browse our application in a not supported Browser.
 
  Thank you!
 
  -Danny
 



--~--~-~--~~~---~--~~
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: Creating JavaScript libraries with GWT - need help

2009-02-03 Thread peterx86

Hi

I have made it work.  Basically, GWT can be used to create javascript.
And the javascript can be read from a file and consumed by v8
javascript engine.

It is very nice.

regards
Peter


On Feb 2, 4:50 pm, peterx86 peter...@gmail.com wrote:
 Hello

 I am trying to Creating JavaScript libraries with GWT.  (There will be
 no client UI related stuffs).

 I have 
 readhttp://googlewebtoolkit.blogspot.com/2008/07/getting-to-really-know-g

 However, above blog is not enough.

 Because i want to use the javascripts created in V8 engine embeded in C
 ++ application.
 So, the final problem needs to be attacked is how to code to do
 something similar to :

   public void onModuleLoad() {
     publish();
   }

 onModuleLoad() is invoked and initialized by the nocache.js file.

 Anyone can help?

 regards
 Peter
--~--~-~--~~~---~--~~
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: any tips for beautify gwt applications?

2009-02-03 Thread Ben Tilford
Wicket does work well with GWT, no need to drop one for the other.

On Tue, Feb 3, 2009 at 8:04 AM, Alex dP (Violet UML Editor, WebVNC...) 
alexandre.de.pelleg...@gmail.com wrote:


 Another suggestion: migrate your project to Apache Wicket and give
 your web page template to a real web designer...

 Sorry for this suggestion but I know that having a beautiful GWT app
 is hard and it's probably not your job to spend time with CSS. By the
 way, don't hesitate to try Wicket and your life will be easier.

 On Feb 2, 11:54 am, jake H pnosti...@gmail.com wrote:
  Hello,
  I m close to finish a gwt application project that i have started a
  month ago. I m really delightful for gwt features and the time needed
  this project to be done. I used the simple widgets of gwt like
  tabpanels, buttons, lists, flextable. But the result seems to be like
  a simple HTML page.
  So i m asking if there are any designing tips to beautify my
  application , so it wouldn't be like a simple HTML page but a nice GWT
  application.( with 'wake effect' and etc )
 
  Ty.
 


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



Using PNG fails compilation on Linux

2009-02-03 Thread Salman Hemani

Hello everyone,

I am using 1.5.3 and although everything works fine on Windows, our
compile fails on Linux due to the exception pasted below. I found the
following post that discusses the same error although the tmp
directory is not our issue (unless I am missing something here).

Here is the related post:

http://groups.google.com/group/Google-Web-Toolkit/browse_thread/thread/1a9d962a11f4f030/605bd4253dedfe17?lnk=gstq=linux+png#605bd4253dedfe17

Does anyone know why using PNG fails the compilation on Linux? Is this
a known issue? Our temporary work around is to use GIF instead of
PNG.

Compilation trace:

 [echo] Compiling com.mycompany.myproject.MyProject
 [java] Compiling module com.mycompany.myproject.MyProject
 [java] java.io.EOFException
 [java] at javax.imageio.stream.ImageInputStreamImpl.readFully
(ImageInputStreamImpl.java:330)
 [java] at java.io.DataInputStream.readUTF
(DataInputStream.java:565)
 [java] at javax.imageio.stream.ImageInputStreamImpl.readUTF
(ImageInputStreamImpl.java:309)
 [java] at
com.sun.imageio.plugins.png.PNGImageReader.parse_iTXt_chunk
(PNGImageReader.java:443)
 [java] at
com.sun.imageio.plugins.png.PNGImageReader.readMetadata
(PNGImageReader.java:647)
 [java] at com.sun.imageio.plugins.png.PNGImageReader.readImage
(PNGImageReader.java:1309)
 [java] at com.sun.imageio.plugins.png.PNGImageReader.read
(PNGImageReader.java:1579)
 [java] at javax.imageio.ImageIO.read(ImageIO.java:1400)
 [java] at javax.imageio.ImageIO.read(ImageIO.java:1364)
 [java] at
com.google.gwt.user.rebind.ui.ImageBundleBuilder.addImage
(ImageBundleBuilder.java:391)
 [java] at
com.google.gwt.user.rebind.ui.ImageBundleBuilder.assimilate
(ImageBundleBuilder.java:303)
 [java] at
com.google.gwt.user.rebind.ui.ImageBundleGenerator.generateImplClass
(ImageBundleGenerator.java:301)
 [java] at
com.google.gwt.user.rebind.ui.ImageBundleGenerator.generate
(ImageBundleGenerator.java:159)
 [java] at com.google.gwt.dev.cfg.RuleGenerateWith.realize
(RuleGenerateWith.java:51)
 [java] at com.google.gwt.dev.shell.StandardRebindOracle
$Rebinder.tryRebind(StandardRebindOracle.java:116)
 [java] at com.google.gwt.dev.shell.StandardRebindOracle
$Rebinder.rebind(StandardRebindOracle.java:61)
 [java] at com.google.gwt.dev.shell.StandardRebindOracle.rebind
(StandardRebindOracle.java:166)
 [java] at com.google.gwt.dev.GWTCompiler
$DistillerRebindPermutationOracle.getAllPossibleRebindAnswers
(GWTCompiler.java:195)
 [java] at
com.google.gwt.dev.jdt.WebModeCompilerFrontEnd.doFindAdditionalTypesUsingRebinds
(WebModeCompilerFrontEnd.java:128)
 [java] at com.google.gwt.dev.jdt.AbstractCompiler
$CompilerImpl.process(AbstractCompiler.java:150)
 [java] at org.eclipse.jdt.internal.compiler.Compiler.compile
(Compiler.java:392)
 [java] at com.google.gwt.dev.jdt.AbstractCompiler
$CompilerImpl.compile(AbstractCompiler.java:84)
 [java] at com.google.gwt.dev.jdt.AbstractCompiler
$CompilerImpl.compile(AbstractCompiler.java:180)
 [java] at com.google.gwt.dev.jdt.AbstractCompiler
$CompilerImpl.access$400(AbstractCompiler.java:70)
 [java] at com.google.gwt.dev.jdt.AbstractCompiler.compile
(AbstractCompiler.java:493)
 [java] at
com.google.gwt.dev.jdt.WebModeCompilerFrontEnd.getCompilationUnitDeclarations
(WebModeCompilerFrontEnd.java:73)
 [java] at
com.google.gwt.dev.jjs.JavaToJavaScriptCompiler.init
(JavaToJavaScriptCompiler.java:277)
 [java] at com.google.gwt.dev.GWTCompiler.distill
(GWTCompiler.java:353)
 [java] at com.google.gwt.dev.GWTCompiler.run(GWTCompiler.java:
564)
 [java] at com.google.gwt.dev.GWTCompiler.run(GWTCompiler.java:
554)
 [java] at com.google.gwt.dev.GWTCompiler.main
(GWTCompiler.java:214)
 [java] Scanning for additional dependencies: file:/home/nightly/
coreIII/main/src/webui/MyProject/src/com/mycompany/myproject/client/
ClientManager.java
 [java]Computing all possible rebind results for
'com.mycompnay.myproject.client.images.MyProjectImageBundle'
 [java]   Rebinding
com.mycompany.myproject.client.images.MyProjectImageBundle
 [java]  Invoking generate-with
class='com.google.gwt.user.rebind.ui.ImageBundleGenerator'/
 [java] Adding image 'com/mycompany/myproject/client/
images/rte/rte_blank.png'
 [java][ERROR] Unable to read image resource
 [java] [ERROR] Errors in 'file:/home/nightly/coreIII/main/src/
webui/MyProject/src/com/mycompany/myproject/client/ClientManager.java'
 [java][ERROR] Line 127:  Failed to resolve
'com.mycompany.myproject.client.images.MyProjectImageBundle' via
deferred binding
 [java] [ERROR] Cannot proceed due to previous errors
 [java] [ERROR] Build failed

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the 

Re: How to add points in chart by clicking on different areas of it?

2009-02-03 Thread saurabh hirani


 Thank, good to know what you were trying to do. Unfortunately, there
 are not specific tools in GChart that do the drag-selection rectangle
 thing, or let you highlight more than a single point. There are poor
 man's ways to do similar things. You might let the user click in the
 upper left, then lower right, and use the two clicks to define the
 rectangle. Not quite the same, I know, but doable via the new
 ClickEvents support.

In fact, when I started out with GWT that is what I was trying to do -
the poor man's way - click, click, click, click, click - rectangle.
The fifth click being at the same point as the first as  I was drawing
lines between points. When I could not get through with it by getting
client2model units, I started looking how others might have
implemented it and then I saw the photo tagging feature of orkut,
which does the rectangle thing. I implemented that in GWT but with the
client window problems that I described above.

regards,
Saurabh Hirani.
saurabh.hir...@gmail.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: Compiler performance improvements in GWT 1.6

2009-02-03 Thread Shawn Pearce
From what we've read on the mailing list, the 1.6 compiler performance
improvement is about forking parallel threads to compile the different
permutations in parallel.  But each permutation is still compiled from
scratch on every pass, due to the large number of global optimizations being
applied, and the unique symbol generation being applied at the very end.

So no, I don't think 1.6 will bring a way to pre-compile code and reuse the
pre-compiled library during subsequent application builds.  But if you have
1 CPU per permutation, you may be able to see the compile time drop down to
1/NCPU of what it is now.


On Tue, Feb 3, 2009 at 02:20, Antonio Leonforte 
antonio.leonfo...@fhoster.com wrote:


 Hi all,
 we are working on a model-driven application builder. We basically
 translate UML diagrams into working applications, and we are using GWT
 for the user interface. We have a major problem with GWT 1.5 compiler
 performace.

 It takes a few seconds to generate the database DDL and the entire
 java code, then a few seconds more to compile the java business logic,
 then TWO MINUTES to compile the GWT-based user interface for just two
 platforms (FF and MSIE).

 One of the problems with compiling our GWT user interface is the fact
 that, with each application, we have to entirely recompile also a huge
 business-intelligence front-ent called Livetable, whose javascript
 size is about 2MB.

 We are considering the possibility to pre-compile the Livetable a
 generic javascript library, maybe using GWT exporter, as explained in
 http://googlewebtoolkit.blogspot.com/2008/07/getting-to-really-know-
 gwt-part-1-jsni.htmlhttp://googlewebtoolkit.blogspot.com/2008/07/getting-to-really-know-%0Agwt-part-1-jsni.html
 and then using this library from the rest of the
 GWT application.

 My questions are:

 1) Will the compiler in GWT 1.6 allow to pre-compile libraries of
 reusable GWT components, so that we don't have to recompile them along
 with the rest of the applications ?

 2) How faster will be the GWT 1.6 compiler ? Any figure on this ?


 Thank you in advance to the entire GWT staff and community.
 Antonio.

 


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



GDE Alpha Released: GWT Development Environment based on Eclipse/ RCP Technology

2009-02-03 Thread Dop Sun

Hi, just wraps up my GWT Development Environment (GDE) into binaries,
and put under google code.

In short, GDE provides tools to create, develop, test, debug, build
and deploy GWT plug-ins, based on Eclipse/ PDE technologies (similar
to PDE? actually, I copied from the statements of PDE. :$)

Technically, GDE utilizes PDE platform, and enables GWT developers
create plug-ins, which can be compiled, deployed in GWT framework.

If you are familiar with PDE/ RCP development, you will like to define
perspectives, views, extension points, and or extensions, GDE enables
you to do the same thing for GWT framework.

Key Points:
* RCP like create, develop, test, debug experience
* Compatible with existing PDE plugins
* Based on Eclipse/ PDE platform

Here is a short article about the GDE:
http://code.google.com/p/ming-gde/wiki/MingGDEVision?ts=1233673890updated=MingGDEVision

Looking forward your comments, suggestions and feedbacks.

Thanks
Dop


--~--~-~--~~~---~--~~
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: How to add points in chart by clicking on different areas of it?

2009-02-03 Thread saurabh hirani



On Feb 2, 6:54 pm, saurabh hirani saurabh.hir...@gmail.com wrote:
 Hi John,

  Just added a new example chart titled World's Simplest Line Chart
  Editor that shows you how to add points to a Client-side GChart curve
  by clicking on empty space on the chart (you'll need to download the
  latest v2.4 version of Cllient-side GChart to use this code):

  Code:http://gchart.googlecode.com/svn/trunk/gcharttestapp/src/com/googleco...
  Screen-shot:http://gchart.googlecode.com/svn/trunk/gchart/src/com/googlecode/gcha...

 Thanks a lot for providing such a thorough explanation of how this can
 be done. I really appreciate your putting in time to answer these
 queries. I will download 2.4 and check it out.

 Basically, I wanted to do this because I wanted to highlight an area
 of an already drawn chart. In the meantime, while I could not know how
 to do this, I had checked out orkut's photo-tagging feature which
 allows us to draw a rectangle over an already existing image.  While I
 implemented drawing a rectangle over an image using GWT with client
 cordinates, I realized that it fails when my image is larger than my
 browser window. Because as I scroll down or on the side my client
 cordinates with respect to a reference point at the top are lost. As
 in, my image's top left edge whose cordinate was say (20, 100) before
 I scroll is no longer in the frame and (20, 100) becomes the cordinate
 of the point at the top left of the browser window which is not the
 top left edge but a portion of the image which came into picture when
 I scrolled down. I saw that you are using clientX and clientY. So I
 thought maybe this information would be useful.


And due to your example I found the missing piece to my puzzle.
getScrollLeft and getScrollTop - I was searching for methods which
could give me these cordinates to solve the problem as described
above. I was studying your code and I used it in my work of drawing
rectangle using GWT and it worked. Thanks a lot.

- Saurabh

--~--~-~--~~~---~--~~
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: Caching question - using GWT to create Google Gadgets

2009-02-03 Thread Eric Ayers

On Mon, Feb 2, 2009 at 9:40 PM, Steven steven.pul...@gmail.com wrote:

 I have a question regarding using the GWT to create gadgets for
 iGoogle.

 I have seen 
 http://code.google.com/docreader/#p=gwt-google-apiss=gwt-google-apist=Gadgets
 which details how you can now use the legacy gadgets API with GWT to
 create gadgets.

 I also noticed that the way the GWT seems to achieve cross browser
 compatibility is to create multiple javascript files and dynamically
 include the right ones.

 I am worried about the performance hit of hosting uncached files on my
 webserver.

 My question is this: does the GWT cache requests to these javascript
 files?

No, GWT doesn't actually cache them.  It routes the request for your
compiled resources through a proxy which is supposed to cache them
(for up to 1 hour, I believe)

 Historically my process has been to have the entire gadget inline as
 type html and where necessary only include external resources after
 using a call to _IG_GetCachedUrl so that they are proxies by google.

 So to clarify, my question is: When GWT spans it's code across
 multiple files does it use _IG_GetCachedUrl to cache the request of
 external javascript - or if not does it at least do something to
 ensure that the javascript will not be requested (from my webserver)
 every time a user loads the gadget.

Turn on pretty mode when you compile, and then look at the generated
.gadget.xml file (add -style PRETTY to the command line) and you'll
see that this is exactly the strategy used in the compiled gadget.

 just curious because on of the things I love about the whole gadget
 space is that it has let me develop interesting projects in a way that
 doesn't put much load on my puny server.

There are things you need to watch out for.  Make sure you load your
.css files through a script take in your module definition
(.gwt.xml).  Also, images could be an issue, but you can translate the
urls to images to go through the proxy with the same _IG_GetCachedUrl
call manually, or you can use the new GadgetImage class (in the next
public update, due out very shortly).


 thanks!

 




-- 
Eric Z. Ayers - GWT Team - Atlanta, GA USA
http://code.google.com/webtoolkit/

--~--~-~--~~~---~--~~
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: What is the most preferred way !!??

2009-02-03 Thread gregor

It's interesting to see how these various methods actually work in
javascript.

In all cases click listeners are managed using the following methods.
If you look at the basic Button constructor you can see it calls the
addClickListener(..) function

function $addClickListener(this$static, listener){
  if (!this$static.clickListeners) {
this$static.clickListeners = $ClickListenerCollection(new
ClickListenerCollection());
sinkEvents(this$static.element, 1 | (this
$static.element.__eventBits || 0));
  }
  $add_2(this$static.clickListeners, listener);
}

Then the user click is detected


function onBrowserEvent(event_0){
  if ($eventGetTypeInt(event_0) == 1) {
if (this.clickListeners) {
  $fireClick(this.clickListeners, this);
}
  }
}

Then the elements with ClickListeners attached are queried to see if
any match the element the user clicked. Obviously the more there are,
the longer this will take.


function $fireClick(this$static, sender){
  var listener, listener$iterator;
  for (listener$iterator = $AbstractList$IteratorImpl(new AbstractList
$IteratorImpl(), this$static); listener$iterator.i  listener
$iterator.this$0.size_0();) {
listener = dynamicCast($next_0(listener$iterator), 5);
$onClick(listener, sender);
  }
}

Now we can look at how three methods of setting up Buttons with
ClickListsners is set up in javascript.

Method 1: A shared ClickListener - note using a hash table lookup
would be much more efficient than this if there where a lot of
them.


ClickListener buttonListener = new ClickListener() {
public void onClick(Widget sender) {
if (sender==sharedButtonOne) {
Window.alert(Shared One);
return;
}
if (sender==sharedButtonTwo) {
Window.alert(Shared Two);
return;
}

}
};

Button sharedButtonOne = new Button(Shared 1,buttonListener);
Button sharedButtonTwo = new Button(Shared 2,buttonListener);

This translates as follows. Note the single listener instance is
translated to Sandbox$1 (my scratch module is called SandBox BTW).
However many Buttons are added we will still have this single instance
of it.

function $SandBox(this$static){
  this$static.layout = $HorizontalPanel(new HorizontalPanel());
  this$static.buttonListener = new SandBox$1();
  this$static.sharedButtonOne = $Button_0(new Button(), 'Shared 1',
this$static.buttonListener);
  this$static.sharedButtonTwo = $Button_0(new Button(), 'Shared 2',
this$static.buttonListener);
  return this$static;
}

function $SandBox$1(this$static, this$0){
  this$static.this$0 = this$0;
  return this$static;
}

function $onClick(this$static, sender){
  if (sender == this$static.this$0.sharedButtonOne) {
$wnd.alert('Shared One');
return;
  }
  if (sender == this$static.this$0.sharedButtonTwo) {
$wnd.alert('Shared Two');
return;
  }
}

function SandBox$1(){
}

_ = SandBox$1.prototype = new Object_0();
_.typeId$ = 23;
_.this$0 = null;



Method 2: using anonymous inner class

Button innerButtonOne = new Button(Inner One, new ClickListener
() {
public void onClick(Widget sender) {
Window.alert(Inner One);
}
});

Button innerButtonTwo = new Button(Inner Two, new ClickListener
() {
public void onClick(Widget sender) {
Window.alert(Inner Two);
}
});


This translates as follows: Note that we now have two listener
objects, both of which will be added to the main ClickListener
collection. With 100 buttons, we would have 100 of them.

function $SandBox(this$static){
  this$static.layout = $HorizontalPanel(new HorizontalPanel());
  this$static.innerButtonOne = $Button_1(new Button(), 'Inner One',
new SandBox$1());
  this$static.innerButtonTwo = $Button_1(new Button(), 'Inner Two',
new SandBox$2());
  return this$static;
}


function onClick(sender){
  $wnd.alert('Inner One');
}

function SandBox$1(){
}

_ = SandBox$1.prototype = new Object_0();
_.onClick = onClick;
_.typeId$ = 23;
function onClick_0(sender){
  $wnd.alert('Inner Two');
}

function SandBox$2(){
}

_ = SandBox$2.prototype = new Object_0();
_.onClick = onClick_0;
_.typeId$ = 24;



method 3: your EButton


EButton ajaysButtonOne = new EButton(Ajay's One) {
public void onClick(Widget sender) {
Window.alert(Ebutton 1);
}
};

EButton ajaysButtonTwo = new EButton(Ajay's Two) {
public void onClick(Widget sender) {
Window.alert(Ebutton 2);
}
};


This translates as follows: As you can see a separate instance (SandBox
$1  sandBox$2) created for each EButton instance. It appears to have
basically turned itself into a ClickListener equivalent to method 2.
It's instructive to compare this with how a normal Button is
constructed in methods 1  2.

function $SandBox(this$static){
  this$static.layout = $HorizontalPanel(new HorizontalPanel());
  this$static.ajaysButtonOne = 

Best image preloading practice?

2009-02-03 Thread darkflame

I have quite a large app being developed, and requires various large
images to be displayed at certain times.

As the app (rather, a educational game) has a login screen, it makes
sense to start loading the images while the user is login in, and in
the order of the images appearance.

I thought I handled this ok with a while loop, going over a list of
images and using ;
Image.prefetch(URL);
To get the images ready.

However, from what I can tell, this is slowing down some systems (CPU
wise). I think this is because I'm effectively telling all the images
to load at once without a pause.
Whats the best practice for loading a large number of images in a set
order?

You can actualy see the game here;
http://www.cuyperscode.com/CuypersCode2/CCIIstart.html
But its in Dutch.



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



Hosted Mode not refreshing

2009-02-03 Thread gemmasilvers

Hello all,

I've inherited a GWT app from a colleague and am currently attempting
to develop it further - but unfortunately I'm getting stuck with
Hosted Mode.  No matter how many times I clear the browser cache,
click refresh on the hosted mode browser, or shout, the parts I've
updated don't update in Hosted Mode.

I've also tried removing the tomcat directory, removing the gwt-tmp
directory Has anyone got any other ideas before I go mad?

Thanks!
Gemma

--~--~-~--~~~---~--~~
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: Check whether browser is supported

2009-02-03 Thread Joe Cole

See this thread. We use this and it works well.

http://groups.google.com/group/Google-Web-Toolkit/browse_thread/thread/41ce4b44e0d4e262/abd93affd092bb47?lnk=gstq=profilercorporation#abd93affd092bb47

On Feb 3, 11:32 pm, Danny Schimke schimk...@googlemail.com wrote:
 Is there an easy way to check whether GWT supports a browser, for example in
 EntryPoint to tell the user, that the Browser is not supported? We've got a
 empty site if we browse our application in a not supported Browser.

 Thank you!

 -Danny
--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



Starting with GWT - Error compiling GWT-RPC Class

2009-02-03 Thread Vinicius Carvalho

Hello there! I've just started with GWT and have this RPC Servlet:

package org.openspotlight.client;

import java.util.List;

import com.google.gwt.user.client.rpc.AsyncCallback;
import com.google.gwt.user.client.rpc.RemoteService;

public interface GWTService extends RemoteService {
public void listAvailableServices(AsyncCallbackListString
callback);
}


package org.openspotlight.server;

import java.util.ArrayList;
import java.util.List;

import org.openspotlight.client.GWTService;
import org.openspotlight.parsers.Parser;

import com.google.gwt.user.client.rpc.AsyncCallback;
import com.google.gwt.user.client.rpc.SerializationException;
import com.google.gwt.user.server.rpc.RemoteServiceServlet;

public class GWTServiceImpl extends RemoteServiceServlet implements
GWTService{

private ListParser parsers;

@Override
public String processCall(String payload) throws
SerializationException {
Thread.currentThread().setContextClassLoader(
  this.getClass().getClassLoader() );
return super.processCall(payload);
}

public void listAvailableServices(AsyncCallbackListString
callback) {
ListString services = new ArrayListString();
if(parsers != null){
for(Parser p : parsers){
services.add(p.getSupportedTypes());
}
}

}

}

module

  !-- Inherit the core Web Toolkit stuff.
--
  inherits name='com.google.gwt.user.User'/

  !-- Inherit the default GWT style sheet.  You can change
--
  !-- the theme of your GWT application by uncommenting
--
  !-- any one of the following lines.
--
  inherits name='com.google.gwt.user.theme.chrome.Chrome'/
  !-- inherits name='com.google.gwt.user.theme.chrome.Chrome'/
--
  !-- inherits name='com.google.gwt.user.theme.dark.Dark'/
--

  !-- Other module inherits
--


  !-- Specify the app entry point class.
--
  entry-point class='org.openspotlight.client.OSLApplication'/

  !-- Specify the application specific style sheet.
--
  stylesheet src='OSLApplication.css' /
  servlet path=/gwtServices
class=org.openspotlight.server.GWTServiceImpl/

/module


When I run ./OSLApplication-compile, I get this error:

vinicius-carvalhos-macbook:gwt-bundle viniciuscarvalho$ ./
OSLApplication-compile
Removing units with errors
   [ERROR] Errors in 'file:/Users/viniciuscarvalho/Documents/Caravela/
spotlight/gwt-bundle/src/org/openspotlight/client/OSLApplication.java'
  [ERROR] Line 5: The import
org.openspotlight.server.GWTServiceImpl cannot be resolved
Compiling module org.openspotlight.OSLApplication
Computing all possible rebind results for
'org.openspotlight.client.OSLApplication'
   Rebinding org.openspotlight.client.OSLApplication
  Checking rule generate-with
class='com.google.gwt.user.rebind.ui.ImageBundleGenerator'/
 [ERROR] Unable to find type
'org.openspotlight.client.OSLApplication'
[ERROR] Hint: Previous compiler errors may have made this
type unavailable
[ERROR] Hint: Check the inheritance chain from your
module; it may not be inheriting a required module or a module may not
be adding its source path entries properly
[ERROR] Build failed


I have external libs pointed using eclipse project properties, but
those libs are used in antoher class (org.openspotlight.gwt.internal)

Any ideas?

BTW: Does compile, compiles all the sources or only those at server
and client folders?

Regards

--~--~-~--~~~---~--~~
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: GDE Alpha Released: GWT Development Environment based on Eclipse/ RCP Technology

2009-02-03 Thread Tom Schindl

Hi,

Amazing stuff. If you now put this together with the E4 efforts of
providing an SWT-Port for GWT and/or by using the UFaceKit [1] project
we are working on (we are just restarting with a GWT-Implementation)
this is going to be a nice thing.

Did you ever thought to join the E4-Project (we are developing the next
generation of Eclipse-IDE and RCP there)? It would be interesting to
hear your expertise knowledge on GWT-stuff.

Tom

[1]http://wiki.eclipse.org/UFaceKit

Dop Sun schrieb:
 Hi, just wraps up my GWT Development Environment (GDE) into binaries,
 and put under google code.

 In short, GDE provides tools to create, develop, test, debug, build
 and deploy GWT plug-ins, based on Eclipse/ PDE technologies (similar
 to PDE? actually, I copied from the statements of PDE. :$)

 Technically, GDE utilizes PDE platform, and enables GWT developers
 create plug-ins, which can be compiled, deployed in GWT framework.

 If you are familiar with PDE/ RCP development, you will like to define
 perspectives, views, extension points, and or extensions, GDE enables
 you to do the same thing for GWT framework.

 Key Points:
 * RCP like create, develop, test, debug experience
 * Compatible with existing PDE plugins
 * Based on Eclipse/ PDE platform

 Here is a short article about the GDE:
 http://code.google.com/p/ming-gde/wiki/MingGDEVision?ts=1233673890updated=MingGDEVision

 Looking forward your comments, suggestions and feedbacks.

 Thanks
 Dop


 

   


--~--~-~--~~~---~--~~
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: Starting with GWT - Error compiling GWT-RPC Class

2009-02-03 Thread Litty Preeth
[ERROR] Errors in 'file:/Users/viniciuscarvalho/

 Documents/Caravela/
 spotlight/gwt-bundle/src/org/openspotlight/client/OSLApplication.java'
  [ERROR] Line 5: *The import
 org.openspotlight.server.**GWTServiceImpl cannot be resolved*


Plz see the line in bold. It says that your client class OSLApplication has
an import of GWTServiceImpl, which is not valid. Why are you importing the
RPC implementation class? I suppose this is by mistake.

 BTW: Does compile, compiles all the sources or only those at server and
client folders?
Only client folder is converted to javascript.


On Tue, Feb 3, 2009 at 4:28 PM, Vinicius Carvalho 
viniciusccarva...@gmail.com wrote:


 Hello there! I've just started with GWT and have this RPC Servlet:

 package org.openspotlight.client;

 import java.util.List;

 import com.google.gwt.user.client.rpc.AsyncCallback;
 import com.google.gwt.user.client.rpc.RemoteService;

 public interface GWTService extends RemoteService {
public void listAvailableServices(AsyncCallbackListString
 callback);
 }


 package org.openspotlight.server;

 import java.util.ArrayList;
 import java.util.List;

 import org.openspotlight.client.GWTService;
 import org.openspotlight.parsers.Parser;

 import com.google.gwt.user.client.rpc.AsyncCallback;
 import com.google.gwt.user.client.rpc.SerializationException;
 import com.google.gwt.user.server.rpc.RemoteServiceServlet;

 public class GWTServiceImpl extends RemoteServiceServlet implements
 GWTService{

private ListParser parsers;

@Override
public String processCall(String payload) throws
 SerializationException {
Thread.currentThread().setContextClassLoader(
  this.getClass().getClassLoader() );
return super.processCall(payload);
}

public void listAvailableServices(AsyncCallbackListString
 callback) {
ListString services = new ArrayListString();
if(parsers != null){
for(Parser p : parsers){
services.add(p.getSupportedTypes());
}
}

}

 }

 module

  !-- Inherit the core Web Toolkit stuff.
 --
  inherits name='com.google.gwt.user.User'/

  !-- Inherit the default GWT style sheet.  You can change
 --
  !-- the theme of your GWT application by uncommenting
 --
  !-- any one of the following lines.
 --
  inherits name='com.google.gwt.user.theme.chrome.Chrome'/
  !-- inherits name='com.google.gwt.user.theme.chrome.Chrome'/
 --
  !-- inherits name='com.google.gwt.user.theme.dark.Dark'/
 --

  !-- Other module inherits
 --


  !-- Specify the app entry point class.
 --
  entry-point class='org.openspotlight.client.OSLApplication'/

  !-- Specify the application specific style sheet.
 --
  stylesheet src='OSLApplication.css' /
  servlet path=/gwtServices
 class=org.openspotlight.server.GWTServiceImpl/

 /module


 When I run ./OSLApplication-compile, I get this error:

 vinicius-carvalhos-macbook:gwt-bundle viniciuscarvalho$ ./
 OSLApplication-compile
 Removing units with errors
   [ERROR] Errors in 'file:/Users/viniciuscarvalho/Documents/Caravela/
 spotlight/gwt-bundle/src/org/openspotlight/client/OSLApplication.java'
  [ERROR] Line 5: The import
 org.openspotlight.server.GWTServiceImpl cannot be resolved
 Compiling module org.openspotlight.OSLApplication
 Computing all possible rebind results for
 'org.openspotlight.client.OSLApplication'
   Rebinding org.openspotlight.client.OSLApplication
  Checking rule generate-with
 class='com.google.gwt.user.rebind.ui.ImageBundleGenerator'/
 [ERROR] Unable to find type
 'org.openspotlight.client.OSLApplication'
[ERROR] Hint: Previous compiler errors may have made this
 type unavailable
[ERROR] Hint: Check the inheritance chain from your
 module; it may not be inheriting a required module or a module may not
 be adding its source path entries properly
 [ERROR] Build failed


 I have external libs pointed using eclipse project properties, but
 those libs are used in antoher class (org.openspotlight.gwt.internal)

 Any ideas?

 BTW: Does compile, compiles all the sources or only those at server
 and client folders?

 Regards

 


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



Check whether browser is supported

2009-02-03 Thread Danny Schimke
Is there an easy way to check whether GWT supports a browser, for example in
EntryPoint to tell the user, that the Browser is not supported? We've got a
empty site if we browse our application in a not supported Browser.

Thank you!

-Danny

--~--~-~--~~~---~--~~
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: Check whether browser is supported

2009-02-03 Thread Danny Schimke
This was helpful. But is there a way to keep out browsers which does
*not*support javascript like the W3M browser? The gwt:onLoadErrorFn-
content
have to be a javascript-function(?), but can I load a simple HTML page
instead without using javascript?

2009/2/3 Joe Cole profilercorporat...@gmail.com


 See this thread. We use this and it works well.


 http://groups.google.com/group/Google-Web-Toolkit/browse_thread/thread/41ce4b44e0d4e262/abd93affd092bb47?lnk=gstq=profilercorporation#abd93affd092bb47

 On Feb 3, 11:32 pm, Danny Schimke schimk...@googlemail.com wrote:
  Is there an easy way to check whether GWT supports a browser, for example
 in
  EntryPoint to tell the user, that the Browser is not supported? We've got
 a
  empty site if we browse our application in a not supported Browser.
 
  Thank you!
 
  -Danny
 


--~--~-~--~~~---~--~~
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: Hosted Mode not refreshing

2009-02-03 Thread Lupo

Hi -
I am new to GWT and had a similar issue as I was going through one of
the tutorials.  For me, anyway, I was clearing the wrong browser
cache.  I had FF and IE on the machine and was clearing the FF cache
but Hosted Mode uses IE.  Once I cleared IE's cache, updated code!

I hope this is helpful.
http://groups.google.com/group/Google-Web-Toolkit/msg/700aeb86f40482de


On Feb 3, 7:28 am, gemmasilvers gemmasilv...@googlemail.com wrote:
 Hello all,

 I've inherited a GWT app from a colleague and am currently attempting
 to develop it further - but unfortunately I'm getting stuck with
 Hosted Mode.  No matter how many times I clear the browser cache,
 click refresh on the hosted mode browser, or shout, the parts I've
 updated don't update in Hosted Mode.

 I've also tried removing the tomcat directory, removing the gwt-tmp
 directory Has anyone got any other ideas before I go mad?

 Thanks!
 Gemma

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



Custom Field Serialization

2009-02-03 Thread Vitor Costa

Hi,

I would like to know if it is possible to control the serialization of
some fields of an object, so that when it's being deserialized in the
client (when it comes from the server) I can apply some
transformations to that field, and also when it's being serialized in
the client (when it is being sent to the server) I can apply the
reverse transformation to it.

I've seen some discussions about CustomFieldSerializer but I can't
find any documentation or example on how to do that.

Thanks in advance,
Vitor.

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



FLEXTABLE CSS ON TR

2009-02-03 Thread bond

Hi,
it's possibile to apply a css to the tag tr of a flextable? I'm
seing that with flexcellformartter I can apply css only to a cell and
so to a td.

Any suggestion?

Thanks

Regards
--~--~-~--~~~---~--~~
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: Clear all html tags from a page

2009-02-03 Thread bond

Thanks,
it's a good idea.

Regads

On 2 Feb, 17:42, Martin Trummer martin.trum...@24act.at wrote:
 here's what I do:
 I put all stuff that I want to hide after the app. start into a div:
 e.g. called loadingdiv (because I use it to show a loading message).
 the first thing I do in my entrypoint, is to hide the loading div:
 e.g.
                 RootPanel.get(loadingdiv).setVisible(false);
 then I build my components and widgets and add this to the rootPanel:
    RootPanel.get().add(viewport);

 hope it helps..

 On Feb 2, 11:51 am, bond daniele.re...@gmail.com wrote:

  Sorry but it doesn't work.

  This is the page .html:

  body
  script language=javascript src=Main.nocache.js/script
  !--iframe id=__gwt_historyFrame style=width:0;height:0;border:
  0/iframe--
  div id=bannercenterimg src=it.pianetatecno.pianetabarche.Main/
  img/sfondo.png alt= width=950 height=130 //center/div
  div id=menu
          ul id=ulmenu
          /ul
          div id=search
          /div
  /div
  hr /

  !-- start page --
  div id=page
          !-- start content --
          div id=content
          /div
          !-- end content --
          !-- start sidebar --
          div id=sidebar
                  ul
                          li
                                  h2 id=titlebox1/h2
                  div id=box1/div
                          /li
                          li
                                  h2 id=titlebox2/h2
                  div id=box2/div
                          /li
              lidiv id=box3/div/li
              lidiv id=box4/div/li
                  /ul
          /div
          !-- end sidebar --
          div style=clear: both;nbsp;/div
  /div
  !-- end page --
  div id=footer
          p class=legal id=legal/p
          p class=credit id=credit/p
  /div
  /body

  I'd like to remove ALL HTML CODE inside body (exception tag script).
  Maybe I've to use DOM.removeChild() or something similar?

  Thanks

  On 2 Feb, 11:43, rudolf michael roud...@gmail.com wrote:

   RootPanel.get(id).removeFromParent();

   On Mon, Feb 2, 2009 at 12:41 PM, bond daniele.re...@gmail.com wrote:

Thanks for your reply. The problem is that RootPanel.get(Id).clear
(); doesn't not delete the tag from the page but only remove widgets
inside the tag.
The problem is that I've not widget inside the tag but other tag with
css style attached.

Any ideas?

Thanks

On 2 Feb, 11:32, rudolf michael roud...@gmail.com wrote:
 RootPanel.get().clear();
 you can always get any div Id also and clear it. by using
 RootPanel.get(Id).clear();

 On Mon, Feb 2, 2009 at 12:31 PM, rudolf michael roud...@gmail.com
wrote:
  RootPanel.get().celar();

  On Mon, Feb 2, 2009 at 12:29 PM, bond daniele.re...@gmail.com 
  wrote:

  Hi,
  I've a simple problem. I've mi page.html where there are some tags:

  div id=tag1div id=tag2div id=tag3/div/div/div

  and so on. I'd like to remove ALL tags inside the body so that I 
  can
  clear the page and then add my widget.

  Thanks for any suggestion

  Regards
--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



Debugging

2009-02-03 Thread fatjack1...@googlemail.com

Hi,

Can someone please tell me the best way to debug my GWT code using
Eclipse?

Regards,
Jack
--~--~-~--~~~---~--~~
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: basic client RPC question;the param of setServiceEntryPoint()

2009-02-03 Thread beeky

Isaac,
Thanks for the offer to help.  Here are the lines from the book, I
think this is all that is needed to illustrate my question.

TaskServiceAsync service = (TaskServiceAsync) GWT.create
(TaskService.class);
ServiceDefTarget serviceDef = (ServiceDefTarget) service ;
serviceDef.setServiceEntryPoint(GWT.getModuleBaseURL() + tasks ) ;

It's tasks that has me confused.  I have the example code from the
book but I don't see tasks used anywhere.  What am I looking for, a
web.xml?  And just to make matters more confusing, is this something
that GWT generates or is this mapping (whereever it is) the developers
responsibility?

Thanks,
-=b


On Feb 3, 3:26 pm, Isaac Truett itru...@gmail.com wrote:
 It's a URL. If your GWT app is located athttp://www.foo.com/myappand
 you set the service entry point to GWT.getModuleBaseURL() +
 myservice then you'll end up sending an HTTP request 
 tohttp://www.foo.com/myapp/myservice, and it will be received by the
 servlet mapped to that URL.

 I haven't seen the example in question so I couldn't speak to why it
 doesn't make sense. If you want to post the relevant bits, I'd be
 happy to puzzle over it with you. It may, of course, just be a typo.

 On Tue, Feb 3, 2009 at 3:06 PM, beeky staff...@marine.rutgers.edu wrote:

  I'm working my way through _Beginning Google Web Toolkit_ by Smeets,
  Boness and Bankras and I'm thoroughly confused by the usage of
  setServiceEntryPoint().

  What is the parameter for this method supposed to be?  It appears to
  be a path since GWT.getModuleBaseURL() is always used as part of the
  parameter.  But in the example from BGWT the rest of the url does not
  correspond to anything in the downloaded example code.

  I thought perhaps the portion after getModuleBaseURL() was a
  configuration item, i.e. a setting for service entry point in
  *.gwt.xml but that does not seem to be the case either.

  Could someone explain what this param is and how it is arrived at?

  Thanks for any help or guidance,
  -=beeky
--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



Does gwt-ext support opera mini browser?

2009-02-03 Thread Mikhail M
Does anyone know if gwt-ext support opera mini browser or ie under windows
mobile 6.1?
My application doesn't work even doesn't start. It's really important to
have properly working application under windows mobile platform.

Is it possible to find any solutions or workaround?
Thanks a lot.

--~--~-~--~~~---~--~~
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: Caching question - using GWT to create Google Gadgets

2009-02-03 Thread Steven

thanks for the info!  especially the note about -PRETTY output (I
should have thought of that!)

On Feb 3, 5:41 am, Eric Ayers zun...@google.com wrote:
 On Mon, Feb 2, 2009 at 9:40 PM, Steven steven.pul...@gmail.com wrote:

  I have a question regarding using the GWT to create gadgets for
  iGoogle.

  I have 
  seenhttp://code.google.com/docreader/#p=gwt-google-apiss=gwt-google-apis...
  which details how you can now use the legacy gadgets API with GWT to
  create gadgets.

  I also noticed that the way the GWT seems to achieve cross browser
  compatibility is to create multiple javascript files and dynamically
  include the right ones.

  I am worried about the performance hit of hosting uncached files on my
  webserver.

  My question is this: does the GWT cache requests to these javascript
  files?

 No, GWT doesn't actually cache them.  It routes the request for your
 compiled resources through a proxy which is supposed to cache them
 (for up to 1 hour, I believe)

  Historically my process has been to have the entiregadgetinline as
  type html and where necessary only include external resources after
  using a call to _IG_GetCachedUrl so that they are proxies by google.

  So to clarify, my question is: When GWT spans it's code across
  multiple files does it use _IG_GetCachedUrl to cache the request of
  external javascript - or if not does it at least do something to
  ensure that the javascript will not be requested (from my webserver)
  every time a user loads thegadget.

 Turn on pretty mode when you compile, and then look at the generated
 .gadget.xml file (add -style PRETTY to the command line) and you'll
 see that this is exactly the strategy used in the compiledgadget.

  just curious because on of the things I love about the wholegadget
  space is that it has let me develop interesting projects in a way that
  doesn't put much load on my puny server.

 There are things you need to watch out for.  Make sure you load your
 .css files through a script take in your module definition
 (.gwt.xml).  Also, images could be an issue, but you can translate the
 urls to images to go through the proxy with the same _IG_GetCachedUrl
 call manually, or you can use the new GadgetImage class (in the next
 public update, due out very shortly).



  thanks!

 --
 Eric Z. Ayers - GWT Team - Atlanta, GA USAhttp://code.google.com/webtoolkit/
--~--~-~--~~~---~--~~
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: Debugging

2009-02-03 Thread Dan Ox

http://code.google.com/intl/da/docreader/#p=google-web-toolkit-doc-1-5s=google-web-toolkit-doc-1-5t=GettingStartedHostedMode

On Feb 4, 8:00 am, fatjack1...@googlemail.com
fatjack1...@googlemail.com wrote:
 Hi,

 Can someone please tell me the best way to debug my GWT code using
 Eclipse?

 Regards,
 Jack
--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



Code Coverage with EclEmma

2009-02-03 Thread Matt Raible

I'm trying to get code coverage support for my GWT project. AFAICT, I
can't use anything from Maven or Ant, I have to use the EclEmma plugin
as described in the following issue:

http://code.google.com/p/google-web-toolkit/issues/detail?id=779

I'm using Eclipse 3.3 with the latest version of EclEmma with the JAR
from tools/redist/emma in my plugins directory.

I can run tests from Eclipse and they all pass. However, the coverage
shows up as if my GWT classes aren't being tested. Furthermore, my
test classes are showing up with good coverage and I don't believe
they should be included at all.

Any advice or howto I can use?

Thanks,

Matt
--~--~-~--~~~---~--~~
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: Debugging

2009-02-03 Thread fatjack1...@googlemail.com

Ok, I have followed this before but I can't get Eclipse to work. It
does not give me an option when I select 'Debug as'. It just says
'none applicable'.

I am trying to run it from the entry point class. Here is the code:

package com.project.client;

import com.google.gwt.core.client.EntryPoint;
import com.google.gwt.core.client.GWT;

import com.google.gwt.user.client.rpc.*;
import com.google.gwt.user.client.ui.Button;
import com.google.gwt.user.client.ui.ClickListener;
import com.google.gwt.user.client.ui.RootPanel;
import com.google.gwt.user.client.ui.VerticalPanel;
import com.google.gwt.user.client.ui.Widget;
import com.google.gwt.user.client.ui.Label;

/**
 * Entry point classes define codeonModuleLoad()/code.
 */
public class ManagementApplication implements EntryPoint {

//Main Menu Widgets
Label title = new Label(Welcome to the Mangement Main Menu!);
Button editItemsButton = new Button(Edit Items);
Button editMenusButton = new Button(Edit Menus);
Button editCategoryButton = new Button(Edit Categories);
Button reportsButton = new Button(Managerial Reports);

//Main Panel
final VerticalPanel mainMenuPanel = new VerticalPanel();

public void mainGUI(){

mainMenuPanel.setWidth(100%);
mainMenuPanel.setHorizontalAlignment(VerticalPanel.ALIGN_CENTER);
//Set Spacing between buttons
mainMenuPanel.setSpacing(20);
mainMenuPanel.add(title);
mainMenuPanel.add(editItemsButton);
mainMenuPanel.add(editMenusButton);
mainMenuPanel.add(editCategoryButton);
mainMenuPanel.add(reportsButton);

// Add Main Menu Panel to the RootPanel
RootPanel.get().add(mainMenuPanel);


//LISTENERS***
//Edit items listener
editItemsButton.addClickListener(new ClickListener() {
public void onClick(Widget sender) {
mainMenuPanel.setVisible(false);
EditItemsGUI ei = new EditItemsGUI();
ei.editItemsGUI();
}
});



  /**
   * This is the entry point method.
   */
public void onModuleLoad() {

mainGUI();

ServerStatusSQLServiceAsync serviceProxy =
(ServerStatusSQLServiceAsync) GWT.create
(ServerStatusSQLService.class);

  ServiceDefTarget target =(ServiceDefTarget) serviceProxy;
  target.setServiceEntryPoint(GWT.getModuleBaseURL()+server-
status);

  AsyncCallback callback = new AsyncCallback(){
  public void onFailure (Throwable caught){
  GWT.log(RPC error, caught);

  try {
   throw caught;
 } catch 
(IncompatibleRemoteServiceException e) {
   // this client is not compatible with 
the server; cleanup
and refresh the
   // browser
 } catch (InvocationException e) {
   // the call didn't complete cleanly
 } catch (Throwable e) {
   // last resort -- a very unexpected 
exception
 }

  }
  public void onSuccess (Object result){
  ServerSQLData data = (ServerSQLData) result;
  GWT.log(ArrayList:  + 
data.itemCategoryArrayList, null);
  GWT.log(Item Types:  + 
data.itemTypeArrayList, null);
  GWT.log(Item Name:  + 
data.itemNameArrayList, null);
  GWT.log(Quantity in stock:  + 
data.itemQuantityArrayList,
null);

  }
  };

  serviceProxy.getSQLData(callback);



}
}


Can anyone spot what I need to do to get it working?

Regards,
Jack

On Feb 3, 10:15 pm, Dan Ox danoxs...@gmail.com wrote:
 http://code.google.com/intl/da/docreader/#p=google-web-toolkit-doc-1-...

 On Feb 4, 8:00 am, fatjack1...@googlemail.com

 fatjack1...@googlemail.com wrote:
  Hi,

  Can someone please tell me the best way to debug my GWT code using
  Eclipse?

  Regards,
  Jack
--~--~-~--~~~---~--~~
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: basic client RPC question;the param of setServiceEntryPoint()

2009-02-03 Thread Dan Ox

there should be an entry in your module.gwt.xml file similar to:

servlet path=/tasks class=com.myapp.TaskServlet /

That is where the task url is registered in hosted mode. When you
deploy to a web server, you will need to specify the servlet with the
tasks mapping in your web.xml.

On Feb 4, 8:31 am, beeky staff...@marine.rutgers.edu wrote:
 Isaac,
 Thanks for the offer to help.  Here are the lines from the book, I
 think this is all that is needed to illustrate my question.

 TaskServiceAsync service = (TaskServiceAsync) GWT.create
 (TaskService.class);
 ServiceDefTarget serviceDef = (ServiceDefTarget) service ;
 serviceDef.setServiceEntryPoint(GWT.getModuleBaseURL() + tasks ) ;

 It's tasks that has me confused.  I have the example code from the
 book but I don't see tasks used anywhere.  What am I looking for, a
 web.xml?  And just to make matters more confusing, is this something
 that GWT generates or is this mapping (whereever it is) the developers
 responsibility?

 Thanks,
 -=b

 On Feb 3, 3:26 pm, Isaac Truett itru...@gmail.com wrote:

  It's a URL. If your GWT app is located athttp://www.foo.com/myappand
  you set the service entry point to GWT.getModuleBaseURL() +
  myservice then you'll end up sending an HTTP request 
  tohttp://www.foo.com/myapp/myservice, and it will be received by the
  servlet mapped to that URL.

  I haven't seen the example in question so I couldn't speak to why it
  doesn't make sense. If you want to post the relevant bits, I'd be
  happy to puzzle over it with you. It may, of course, just be a typo.

  On Tue, Feb 3, 2009 at 3:06 PM, beeky staff...@marine.rutgers.edu wrote:

   I'm working my way through _Beginning Google Web Toolkit_ by Smeets,
   Boness and Bankras and I'm thoroughly confused by the usage of
   setServiceEntryPoint().

   What is the parameter for this method supposed to be?  It appears to
   be a path since GWT.getModuleBaseURL() is always used as part of the
   parameter.  But in the example from BGWT the rest of the url does not
   correspond to anything in the downloaded example code.

   I thought perhaps the portion after getModuleBaseURL() was a
   configuration item, i.e. a setting for service entry point in
   *.gwt.xml but that does not seem to be the case either.

   Could someone explain what this param is and how it is arrived at?

   Thanks for any help or guidance,
   -=beeky
--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



escape html

2009-02-03 Thread Arend van der Veen
Hi All,

I have a very simple question.  I have been sifting through the API looking
for a way to escape a string so that it is HTML safe?

new HTML(b+escapeFunction(variable)+/b)

Am I missing something or is escapeFunction something that I need to support
myself.

Thanks,
Arend

--~--~-~--~~~---~--~~
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: basic client RPC question;the param of setServiceEntryPoint()

2009-02-03 Thread Isaac Truett

Dan is correct. For hosted mode, there would be a servlet tag such
as that. For web mode or hosted mode with -noserver, it would be a
mapping in web.xml.



On Tue, Feb 3, 2009 at 5:22 PM, Dan Ox danoxs...@gmail.com wrote:

 there should be an entry in your module.gwt.xml file similar to:

 servlet path=/tasks class=com.myapp.TaskServlet /

 That is where the task url is registered in hosted mode. When you
 deploy to a web server, you will need to specify the servlet with the
 tasks mapping in your web.xml.

 On Feb 4, 8:31 am, beeky staff...@marine.rutgers.edu wrote:
 Isaac,
 Thanks for the offer to help.  Here are the lines from the book, I
 think this is all that is needed to illustrate my question.

 TaskServiceAsync service = (TaskServiceAsync) GWT.create
 (TaskService.class);
 ServiceDefTarget serviceDef = (ServiceDefTarget) service ;
 serviceDef.setServiceEntryPoint(GWT.getModuleBaseURL() + tasks ) ;

 It's tasks that has me confused.  I have the example code from the
 book but I don't see tasks used anywhere.  What am I looking for, a
 web.xml?  And just to make matters more confusing, is this something
 that GWT generates or is this mapping (whereever it is) the developers
 responsibility?

 Thanks,
 -=b

 On Feb 3, 3:26 pm, Isaac Truett itru...@gmail.com wrote:

  It's a URL. If your GWT app is located athttp://www.foo.com/myappand
  you set the service entry point to GWT.getModuleBaseURL() +
  myservice then you'll end up sending an HTTP request 
  tohttp://www.foo.com/myapp/myservice, and it will be received by the
  servlet mapped to that URL.

  I haven't seen the example in question so I couldn't speak to why it
  doesn't make sense. If you want to post the relevant bits, I'd be
  happy to puzzle over it with you. It may, of course, just be a typo.

  On Tue, Feb 3, 2009 at 3:06 PM, beeky staff...@marine.rutgers.edu wrote:

   I'm working my way through _Beginning Google Web Toolkit_ by Smeets,
   Boness and Bankras and I'm thoroughly confused by the usage of
   setServiceEntryPoint().

   What is the parameter for this method supposed to be?  It appears to
   be a path since GWT.getModuleBaseURL() is always used as part of the
   parameter.  But in the example from BGWT the rest of the url does not
   correspond to anything in the downloaded example code.

   I thought perhaps the portion after getModuleBaseURL() was a
   configuration item, i.e. a setting for service entry point in
   *.gwt.xml but that does not seem to be the case either.

   Could someone explain what this param is and how it is arrived at?

   Thanks for any help or guidance,
   -=beeky
 


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



basic client RPC question;the param of setServiceEntryPoint()

2009-02-03 Thread beeky

I'm working my way through _Beginning Google Web Toolkit_ by Smeets,
Boness and Bankras and I'm thoroughly confused by the usage of
setServiceEntryPoint().

What is the parameter for this method supposed to be?  It appears to
be a path since GWT.getModuleBaseURL() is always used as part of the
parameter.  But in the example from BGWT the rest of the url does not
correspond to anything in the downloaded example code.

I thought perhaps the portion after getModuleBaseURL() was a
configuration item, i.e. a setting for service entry point in
*.gwt.xml but that does not seem to be the case either.

Could someone explain what this param is and how it is arrived at?

Thanks for any help or guidance,
-=beeky

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



Junit 4.0/4.5 support planned?

2009-02-03 Thread andrej


Any idea? Thx.

--~--~-~--~~~---~--~~
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: need GWT tutorial

2009-02-03 Thread Sumit Chandel
Hi babar,
You may also find the tutorial in the Developer Guide to be a good example
of building a functional sample application using GWT. You can check it out
at the link below:

StockWatcher Tutorial:
http://code.google.com/docreader/#p=google-web-toolkit-doc-1-5s=google-web-toolkit-doc-1-5t=GettingStartedTutorial

The tutorial goes through the basics involved in building a GWT application
as well as some advanced topics like GWT RPC communication and JUnit
testing.

Hope that helps,
-Sumit Chandel

On Sun, Feb 1, 2009 at 6:37 AM, Arthur Kalmenson arthur.k...@gmail.comwrote:


 You could also buy a book on GWT. There are a number of good ones. I
 suggest Google Web Toolkit Applications. It's a little old (doesn't
 cover 1.5), but still a very good book.

 --
 Arthur Kalmenson



 On Thu, Jan 29, 2009 at 11:43 PM, babar nazir mbabarna...@gmail.com
 wrote:
  thanks charlie,
  i have read it but it is not sufficent to me. i want to build a demo
  application myself, please provide your assistance in this matter .
 
  Regards:
  Babar
 
  On Thu, Jan 29, 2009 at 4:14 PM, Charlie Collins 
 charlie.coll...@gmail.com
  wrote:
 
  http://code.google.com/webtoolkit/gettingstarted.html
 
  On Jan 29, 5:20 am, babar mbabarna...@gmail.com wrote:
   hi fellows,
  
   i need GWT tutorial urgently,
   because i have to present it to my fellows
  
   Regards:
   Babar
 
 
 
  
 

 


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



MissingResourceException thrown for null values in Dictionary

2009-02-03 Thread devesh

If I have a key associated with a null value in a Dictionary, the get
(String) method will throw a MissingResourceException. Is that
intended? The javadoc at
http://google-web-toolkit.googlecode.com/svn/javadoc/1.5/com/google/gwt/i18n/client/Dictionary.html
does not make this clear.

Here's an example of a dictionary with a misbehaving key/value pair:

var badDict = {
  badKey: null
};

--~--~-~--~~~---~--~~
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: about GWT compiler performance

2009-02-03 Thread Pham Tran Quoc Viet
Hi,What is the value for Chrome browser? I tried this, but it crashed.
Thanks.

inherits name='com.google.gwt.user.User'/
  inherits name='com.google.gwt.user.UserAgent'/
  set-property name='user.agent' value='chrome'/


Here is the crash:
[ERROR] Unable to get value of property 'user.agent'
com.google.gwt.core.ext.BadPropertyValueException: Property 'user.agent'
cannot be set to unexpected value 'chrome'
at
com.google.gwt.dev.shell.ModuleSpacePropertyOracle.computePropertyValue(ModuleSpacePropertyOracle.java:114)
at
com.google.gwt.dev.shell.ModuleSpacePropertyOracle.getPropertyValue(ModuleSpacePropertyOracle.java:59)
at
com.google.gwt.dev.cfg.ConditionWhenPropertyIs.doEval(ConditionWhenPropertyIs.java:48)
at com.google.gwt.dev.cfg.Condition.isTrue(Condition.java:36)
at com.google.gwt.dev.cfg.ConditionAll.doEval(ConditionAll.java:37)
at com.google.gwt.dev.cfg.Condition.isTrue(Condition.java:36)
at com.google.gwt.dev.cfg.Rule.isApplicable(Rule.java:35)
at
com.google.gwt.dev.shell.StandardRebindOracle$Rebinder.tryRebind(StandardRebindOracle.java:106)
at
com.google.gwt.dev.shell.StandardRebindOracle$Rebinder.rebind(StandardRebindOracle.java:61)
at
com.google.gwt.dev.shell.StandardRebindOracle.rebind(StandardRebindOracle.java:166)
at
com.google.gwt.dev.shell.ShellModuleSpaceHost.rebind(ShellModuleSpaceHost.java:114)

Viet Pham


On Sun, Feb 1, 2009 at 9:48 AM, Niklas Derouche nik...@gmail.com wrote:

 Well, for me it only generates the IE version and the time is down to about
 40 percent.
 clean out the www folder before the compile perhaps?

 n.


 On Sun, Feb 1, 2009 at 6:35 PM, Pham Tran Quoc Viet 
 phamtranquocv...@gmail.com wrote:

 Hi,Great. That went through without error. How do you verify if only ie6
 version is created? I looked at the www folder and saw a bunch of html files
 whose names are some_random_number.html

 The time it took to compile did not seem to improve either. Thanks.

 Viet Pham


 On Sun, Feb 1, 2009 at 9:22 AM, Niklas Derouche nik...@gmail.com wrote:

 Hi,
 try:

 inherits name='com.google.gwt.user.User'/
 inherits name='com.google.gwt.user.UserAgent'/
 set-property name='user.agent' value='ie6'/

 if you see what I mean.

 n.

 On Sat, Jan 31, 2009 at 2:58 AM, Pham Tran Quoc Viet 
 phamtranquocv...@gmail.com wrote:

 Hi,
 I followed the advise in this thread and added the following to my
 module.gwt.xml:
 module
   set-property name=user.agent value=ie6 /
   extend-property name=locale values=en_US /

   !-- Inherit required packages --
   ...
   !-- Style sheets --
   ...
   !-- Entry point --
   ...
 /module

 I got this error:
 [ERROR] Property 'user.agent' not found
 [ERROR] Failure while parsing XML

 Any ideas? Thanks.
 Viet Pham



 On Sun, Nov 9, 2008 at 12:10 AM, surfer lorenzo.naza...@gmail.comwrote:


 many many thanks
 using set-property name=user.agent value=gecko /
 the time of compilation fell down from 3':10 to 1':37

 Lorenzo

 On 8 Nov, 02:13, Ian Petersen ispet...@gmail.com wrote:
  On Fri, Nov 7, 2008 at 6:06 PM, surfer lorenzo.naza...@gmail.com
 wrote:
   since often the main development of an application is viewed and
   debugged with one single type of browser and only sometimes
 verified
   on the others, does anybody know if it's possible to force GWT
   compiler to build javascript code for just one single target
 browser,
   in order to increase compiling phase performance ?
 
  Yes it's possible.  The answer lies behind this link:
 http://groups.google.com/group/Google-Web-Toolkit/search?group=Google.
 ..
 
  Ian







 --
 ---
 Ave bossa nova, similis bossa seneca








 --
 ---
 Ave bossa nova, similis bossa seneca

 


--~--~-~--~~~---~--~~
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: What is the most preferred way !!??

2009-02-03 Thread Ajay Garg

But isn't Javascript static keyword, different from Java static
keyword ... In Javascript, it still regains object scope, while in
Java, it is a class scope .??

On Feb 3, 9:42 pm, gregor greg.power...@googlemail.com wrote:
 It's interesting to see how these various methods actually work in
 javascript.

 In all cases click listeners are managed using the following methods.
 If you look at the basic Button constructor you can see it calls the
 addClickListener(..) function

 function $addClickListener(this$static, listener){
   if (!this$static.clickListeners) {
     this$static.clickListeners = $ClickListenerCollection(new
 ClickListenerCollection());
     sinkEvents(this$static.element, 1 | (this
 $static.element.__eventBits || 0));
   }
   $add_2(this$static.clickListeners, listener);

 }

 Then the user click is detected

 function onBrowserEvent(event_0){
   if ($eventGetTypeInt(event_0) == 1) {
     if (this.clickListeners) {
       $fireClick(this.clickListeners, this);
     }
   }

 }

 Then the elements with ClickListeners attached are queried to see if
 any match the element the user clicked. Obviously the more there are,
 the longer this will take.

 function $fireClick(this$static, sender){
   var listener, listener$iterator;
   for (listener$iterator = $AbstractList$IteratorImpl(new AbstractList
 $IteratorImpl(), this$static); listener$iterator.i  listener
 $iterator.this$0.size_0();) {
     listener = dynamicCast($next_0(listener$iterator), 5);
     $onClick(listener, sender);
   }

 }

 Now we can look at how three methods of setting up Buttons with
 ClickListsners is set up in javascript.

 Method 1: A shared ClickListener - note using a hash table lookup
 would be much more efficient than this if there where a lot of
 them.

     ClickListener buttonListener = new ClickListener() {
         public void onClick(Widget sender) {
             if (sender==sharedButtonOne) {
                 Window.alert(Shared One);
                 return;
             }
             if (sender==sharedButtonTwo) {
                 Window.alert(Shared Two);
                 return;
             }

         }
     };

     Button sharedButtonOne = new Button(Shared 1,buttonListener);
     Button sharedButtonTwo = new Button(Shared 2,buttonListener);

 This translates as follows. Note the single listener instance is
 translated to Sandbox$1 (my scratch module is called SandBox BTW).
 However many Buttons are added we will still have this single instance
 of it.

 function $SandBox(this$static){
   this$static.layout = $HorizontalPanel(new HorizontalPanel());
   this$static.buttonListener = new SandBox$1();
   this$static.sharedButtonOne = $Button_0(new Button(), 'Shared 1',
 this$static.buttonListener);
   this$static.sharedButtonTwo = $Button_0(new Button(), 'Shared 2',
 this$static.buttonListener);
   return this$static;

 }

 function $SandBox$1(this$static, this$0){
   this$static.this$0 = this$0;
   return this$static;

 }

 function $onClick(this$static, sender){
   if (sender == this$static.this$0.sharedButtonOne) {
     $wnd.alert('Shared One');
     return;
   }
   if (sender == this$static.this$0.sharedButtonTwo) {
     $wnd.alert('Shared Two');
     return;
   }

 }

 function SandBox$1(){

 }

 _ = SandBox$1.prototype = new Object_0();
 _.typeId$ = 23;
 _.this$0 = null;

 Method 2: using anonymous inner class

     Button innerButtonOne = new Button(Inner One, new ClickListener
 () {
         public void onClick(Widget sender) {
             Window.alert(Inner One);
         }
     });

     Button innerButtonTwo = new Button(Inner Two, new ClickListener
 () {
         public void onClick(Widget sender) {
             Window.alert(Inner Two);
         }
     });

 This translates as follows: Note that we now have two listener
 objects, both of which will be added to the main ClickListener
 collection. With 100 buttons, we would have 100 of them.

 function $SandBox(this$static){
   this$static.layout = $HorizontalPanel(new HorizontalPanel());
   this$static.innerButtonOne = $Button_1(new Button(), 'Inner One',
 new SandBox$1());
   this$static.innerButtonTwo = $Button_1(new Button(), 'Inner Two',
 new SandBox$2());
   return this$static;

 }

 function onClick(sender){
   $wnd.alert('Inner One');

 }

 function SandBox$1(){

 }

 _ = SandBox$1.prototype = new Object_0();
 _.onClick = onClick;
 _.typeId$ = 23;
 function onClick_0(sender){
   $wnd.alert('Inner Two');

 }

 function SandBox$2(){

 }

 _ = SandBox$2.prototype = new Object_0();
 _.onClick = onClick_0;
 _.typeId$ = 24;

 method 3: your EButton

     EButton ajaysButtonOne = new EButton(Ajay's One) {
         public void onClick(Widget sender) {
             Window.alert(Ebutton 1);
         }
     };

     EButton ajaysButtonTwo = new EButton(Ajay's Two) {
         public void onClick(Widget sender) {
             Window.alert(Ebutton 2);
         }
     };

 This translates as follows: As you can see a separate instance (SandBox

Re: how to catch the double click event

2009-02-03 Thread Litty Preeth
No the constants for both are different... Event.ONCLICK and Event.
ONDBLCLICK

On Wed, Feb 4, 2009 at 12:44 PM, arun theeperfection...@gmail.com wrote:


 i have a requirement to catch the double click event. i am catching
 right click too. but both event are getting mixed up. only right click
 is working fine. Thsi may be because both event have same constant
 field values. is ther eany way to distinguish these two?
 Any help would be appreciated.
 


--~--~-~--~~~---~--~~
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] [google-web-toolkit commit] r4603 - trunk/doc

2009-02-03 Thread codesite-noreply
Author: fabb...@google.com
Date: Tue Feb  3 08:14:45 2009
New Revision: 4603

Modified:
trunk/doc/build.xml

Log:
Whitelisting the new event packages for javadoc.  (This should be a
blacklist instead, but that's a TODO.)

Review by: ecc


Modified: trunk/doc/build.xml
==
--- trunk/doc/build.xml (original)
+++ trunk/doc/build.xml Tue Feb  3 08:14:45 2009
@@ -10,7 +10,7 @@
property.ensure name=gwt.dev.jar  
location=${gwt.build.lib}/gwt-dev-linux.jar /

property name=USER_PKGS
-   
value=com.google.gwt.core.client;com.google.gwt.core.ext;com.google.gwt.core.ext.soyc;com.google.gwt.core.ext.linker;com.google.gwt.core.ext.typeinfo;com.google.gwt.dom.client;com.google.gwt.i18n.client;com.google.gwt.i18n.rebind.format;com.google.gwt.i18n.rebind.keygen;com.google.gwt.json.client;com.google.gwt.junit.client;com.google.gwt.benchmarks.client;com.google.gwt.user.client;com.google.gwt.user.client.rpc;com.google.gwt.user.client.ui;com.google.gwt.user.server.rpc;com.google.gwt.xml.client;com.google.gwt.http.client;com.google.gwt.animation.client
  
/
+   
value=com.google.gwt.core.client;com.google.gwt.core.ext;com.google.gwt.core.ext.soyc;com.google.gwt.core.ext.linker;com.google.gwt.core.ext.typeinfo;com.google.gwt.dom.client;com.google.gwt.i18n.client;com.google.gwt.i18n.rebind.format;com.google.gwt.i18n.rebind.keygen;com.google.gwt.json.client;com.google.gwt.junit.client;com.google.gwt.benchmarks.client;com.google.gwt.user.client;com.google.gwt.user.client.rpc;com.google.gwt.user.client.ui;com.google.gwt.user.server.rpc;com.google.gwt.xml.client;com.google.gwt.http.client;com.google.gwt.animation.client;com.google.gwt.event.dom.client;com.google.gwt.event.logical.shared;com.google.gwt.event.shared;com.google.gwt.debug.client;com.google.gwt.user.datepicker.client
  
/
property name=LANG_PKGS  
value=java.lang;java.lang.annotation;java.util;java.io;java.sql /

!--Individual classes to include when we don't want to

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



[gwt-contrib] after the fact code review: bumping up stack needed by gwt incubator's test suite:

2009-02-03 Thread Emily Crutcher
Here is the change:
http://code.google.com/p/google-web-toolkit-incubator/source/detail?r=1466

-- 
There are only 10 types of people in the world: Those who understand
binary, and those who don't

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



[gwt-contrib] Re: DropDownListBox upgrade

2009-02-03 Thread Emily Crutcher
Committed as r1467


On Mon, Feb 2, 2009 at 6:08 PM, Emily Crutcher e...@google.com wrote:

 Yep, thanks for the review!


 On Mon, Feb 2, 2009 at 5:46 PM, itru...@gmail.com wrote:

 LGTM, with the removal of stray debug code from DropDownPanel.


 http://gwt-code-reviews.appspot.com/2402/diff/1/10
 File src/com/google/gwt/gen2/commonwidget/client/DropDownPanel.java
 (right):

 http://gwt-code-reviews.appspot.com/2402/diff/1/10#newcode37
 Line 37: static int fool;
 Is this debugging code that didn't get removed?


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




 --
 There are only 10 types of people in the world: Those who understand
 binary, and those who don't




-- 
There are only 10 types of people in the world: Those who understand
binary, and those who don't

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



[gwt-contrib] Re: [google-web-toolkit commit] r4602 - releases/1.6/user/src/com/google/gwt/user/client/impl

2009-02-03 Thread Scott Blum
w00t!  Thanks for tracking this down, John!

On Mon, Feb 2, 2009 at 10:45 PM, codesite-nore...@google.com wrote:


 Author: jlaba...@google.com
 Date: Mon Feb  2 19:37:44 2009
 New Revision: 4602

 Modified:
releases/1.6/user/src/com/google/gwt/user/client/impl/DOMImplIE6.java

 Log:
 IE natively throws only a double-click event when you click on an element
 twice, so DOMImplIE6 creates a second click event for the user.  However,
 we currently fire the event on the element where the double-click event was
 sunk instead of on the srcElement of the double-click event.  In other
 words, if a user double clicks in a cell in an HTMLTable, the source of the
 first click event is the cell, the source of the second click event is the
 table itself.  This patch fires the event against $wnd.event.srcElement
 instead of against the element that the double click event is sunk on.

 Patch by: jlabanca
 Review by: jgw (TBR)

 Modified:
 releases/1.6/user/src/com/google/gwt/user/client/impl/DOMImplIE6.java

 ==
 --- releases/1.6/user/src/com/google/gwt/user/client/impl/DOMImplIE6.java
 (original)
 +++ releases/1.6/user/src/com/google/gwt/user/client/impl/DOMImplIE6.java
 Mon Feb  2 19:37:44 2009
 @@ -108,7 +108,7 @@

  @com.google.gwt.user.client.impl.DOMImplIE6::dispatchDblClickEvent =
 function() {
var newEvent = $doc.createEventObject();
 -  this.fireEvent('onclick', newEvent);
 +  $wnd.event.srcElement.fireEvent('onclick', newEvent);
if (this.__eventBits  2) {

 @com.google.gwt.user.client.impl.DOMImplIE6::dispatchEvent.call(this);
}

 


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



[gwt-contrib] Re: after the fact code review: bumping up stack needed by gwt incubator's test suite:

2009-02-03 Thread Emily Crutcher
For the heap, I think that would be a good change. The stack though  in
general, is not something programs should have to mess with.


On Tue, Feb 3, 2009 at 11:59 AM, Freeland Abbott gwt.team.fabb...@gmail.com
 wrote:

 Looks good, but can we make heap and stack be parameters to gwt.junit?  For
 incubator it may not matter, but when you have a second suite you may want
 different memory profiles in each.

 Something like:

 *macrodef name=gwt.junit

...
**attribute name=jvm.heap default=512M /
 **   **attribute name=jvm.stack default=1M /*
...
 *   **jvmarg line=-...@{jvm.heap} -x...@{jvm.stack} /
...


 *and then each use can set its own limits, like so:*

 gwt.junit jvm.heap=1G jvm.stack=256K ... /
 *



 On Tue, Feb 3, 2009 at 11:53 AM, Emily Crutcher e...@google.com wrote:

 Here is the change:
 http://code.google.com/p/google-web-toolkit-incubator/source/detail?r=1466

 --
 There are only 10 types of people in the world: Those who understand
 binary, and those who don't





-- 
There are only 10 types of people in the world: Those who understand
binary, and those who don't

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



[gwt-contrib] Re: after the fact code review: bumping up stack needed by gwt incubator's test suite:

2009-02-03 Thread Freeland Abbott
I'll LGTM either way, since you've only got one test anyway... but in GWT
projects, I've seen more than one stack change required recently.

On Tue, Feb 3, 2009 at 12:33 PM, Emily Crutcher e...@google.com wrote:

 For the heap, I think that would be a good change. The stack though  in
 general, is not something programs should have to mess with.



 On Tue, Feb 3, 2009 at 11:59 AM, Freeland Abbott 
 gwt.team.fabb...@gmail.com wrote:

 Looks good, but can we make heap and stack be parameters to gwt.junit?
 For incubator it may not matter, but when you have a second suite you may
 want different memory profiles in each.

 Something like:

 *macrodef name=gwt.junit

...
**attribute name=jvm.heap default=512M /
 **   **attribute name=jvm.stack default=1M /*
...
 *   **jvmarg line=-...@{jvm.heap} -x...@{jvm.stack} /
...


 *and then each use can set its own limits, like so:*


 gwt.junit jvm.heap=1G jvm.stack=256K ... /
 *



 On Tue, Feb 3, 2009 at 11:53 AM, Emily Crutcher e...@google.com wrote:

 Here is the change:
 http://code.google.com/p/google-web-toolkit-incubator/source/detail?r=1466

 --
 There are only 10 types of people in the world: Those who understand
 binary, and those who don't





 --
 There are only 10 types of people in the world: Those who understand
 binary, and those who don't

 


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



[gwt-contrib] Re: [google-web-toolkit commit] r4603 - trunk/doc

2009-02-03 Thread Scott Blum
Shouldn't this have gone into 1.6?

On Tue, Feb 3, 2009 at 11:15 AM, codesite-nore...@google.com wrote:

 Author: fabb...@google.com
 Date: Tue Feb  3 08:14:45 2009
 New Revision: 4603

 Modified:
trunk/doc/build.xml

 Log:
 Whitelisting the new event packages for javadoc.  (This should be a
 blacklist instead, but that's a TODO.)

 Review by: ecc


 Modified: trunk/doc/build.xml

 ==
 --- trunk/doc/build.xml (original)
 +++ trunk/doc/build.xml Tue Feb  3 08:14:45 2009
 @@ -10,7 +10,7 @@
property.ensure name=gwt.dev.jar
 location=${gwt.build.lib}/gwt-dev-linux.jar /

property name=USER_PKGS
 -

 value=com.google.gwt.core.client;com.google.gwt.core.ext;com.google.gwt.core.ext.soyc;com.google.gwt.core.ext.linker;com.google.gwt.core.ext.typeinfo;com.google.gwt.dom.client;com.google.gwt.i18n.client;com.google.gwt.i18n.rebind.format;com.google.gwt.i18n.rebind.keygen;com.google.gwt.json.client;com.google.gwt.junit.client;com.google.gwt.benchmarks.client;com.google.gwt.user.client;com.google.gwt.user.client.rpc;com.google.gwt.user.client.ui;com.google.gwt.user.server.rpc;com.google.gwt.xml.client;com.google.gwt.http.client;com.google.gwt.animation.client
 /
 +

 value=com.google.gwt.core.client;com.google.gwt.core.ext;com.google.gwt.core.ext.soyc;com.google.gwt.core.ext.linker;com.google.gwt.core.ext.typeinfo;com.google.gwt.dom.client;com.google.gwt.i18n.client;com.google.gwt.i18n.rebind.format;com.google.gwt.i18n.rebind.keygen;com.google.gwt.json.client;com.google.gwt.junit.client;com.google.gwt.benchmarks.client;com.google.gwt.user.client;com.google.gwt.user.client.rpc;com.google.gwt.user.client.ui;com.google.gwt.user.server.rpc;com.google.gwt.xml.client;com.google.gwt.http.client;com.google.gwt.animation.client;com.google.gwt.event.dom.client;com.google.gwt.event.logical.shared;com.google.gwt.event.shared;com.google.gwt.debug.client;com.google.gwt.user.datepicker.client
 /
property name=LANG_PKGS
 value=java.lang;java.lang.annotation;java.util;java.io;java.sql /

!--Individual classes to include when we don't want to

 


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



[gwt-contrib] Re: after the fact code review: bumping up stack needed by gwt incubator's test suite:

2009-02-03 Thread Emily Crutcher
Adding heap param:
http://code.google.com/p/google-web-toolkit-incubator/source/detail?r=1468

The difference is with heap, the amount of memory is proportional to the
size of the tests and has a significant cost to set to high.

With stack, the size is proportional to nothing user visible, just a matter
of how the gwt serialization happened to work, and the number does not
effect performance in any significant way.


On Tue, Feb 3, 2009 at 12:38 PM, Freeland Abbott gwt.team.fabb...@gmail.com
 wrote:

 I'll LGTM either way, since you've only got one test anyway... but in GWT
 projects, I've seen more than one stack change required recently.


 On Tue, Feb 3, 2009 at 12:33 PM, Emily Crutcher e...@google.com wrote:

 For the heap, I think that would be a good change. The stack though  in
 general, is not something programs should have to mess with.



 On Tue, Feb 3, 2009 at 11:59 AM, Freeland Abbott 
 gwt.team.fabb...@gmail.com wrote:

 Looks good, but can we make heap and stack be parameters to gwt.junit?
 For incubator it may not matter, but when you have a second suite you may
 want different memory profiles in each.

 Something like:

 *macrodef name=gwt.junit

...
**attribute name=jvm.heap default=512M /
 **   **attribute name=jvm.stack default=1M /*
...
 *   **jvmarg line=-...@{jvm.heap} -x...@{jvm.stack} /
...


 *and then each use can set its own limits, like so:*



 gwt.junit jvm.heap=1G jvm.stack=256K ... /
 *



 On Tue, Feb 3, 2009 at 11:53 AM, Emily Crutcher e...@google.com wrote:

 Here is the change:
 http://code.google.com/p/google-web-toolkit-incubator/source/detail?r=1466

 --
 There are only 10 types of people in the world: Those who understand
 binary, and those who don't





 --
 There are only 10 types of people in the world: Those who understand
 binary, and those who don't




 



-- 
There are only 10 types of people in the world: Those who understand
binary, and those who don't

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



[gwt-contrib] Re: after the fact code review: bumping up stack needed by gwt incubator's test suite:

2009-02-03 Thread Freeland Abbott
LGTM as promised.

My argument for the stack parameterization, though, is that once
parameterized most uses can be silent and just use the default, but if
somebody *does* care, then they can easily set it.  The argument about
performance says this may not matter much, though.


On Tue, Feb 3, 2009 at 1:10 PM, Emily Crutcher e...@google.com wrote:

 Adding heap param:
 http://code.google.com/p/google-web-toolkit-incubator/source/detail?r=1468

 The difference is with heap, the amount of memory is proportional to the
 size of the tests and has a significant cost to set to high.

 With stack, the size is proportional to nothing user visible, just a matter
 of how the gwt serialization happened to work, and the number does not
 effect performance in any significant way.



 On Tue, Feb 3, 2009 at 12:38 PM, Freeland Abbott 
 gwt.team.fabb...@gmail.com wrote:

 I'll LGTM either way, since you've only got one test anyway... but in GWT
 projects, I've seen more than one stack change required recently.


 On Tue, Feb 3, 2009 at 12:33 PM, Emily Crutcher e...@google.com wrote:

 For the heap, I think that would be a good change. The stack though  in
 general, is not something programs should have to mess with.



 On Tue, Feb 3, 2009 at 11:59 AM, Freeland Abbott 
 gwt.team.fabb...@gmail.com wrote:

 Looks good, but can we make heap and stack be parameters to gwt.junit?
 For incubator it may not matter, but when you have a second suite you may
 want different memory profiles in each.

 Something like:

 *macrodef name=gwt.junit

...
**attribute name=jvm.heap default=512M /
 **   **attribute name=jvm.stack default=1M /*
...
 *   **jvmarg line=-...@{jvm.heap} -x...@{jvm.stack} /
...


 *and then each use can set its own limits, like so:*




 gwt.junit jvm.heap=1G jvm.stack=256K ... /
 *



 On Tue, Feb 3, 2009 at 11:53 AM, Emily Crutcher e...@google.com wrote:

 Here is the change:
 http://code.google.com/p/google-web-toolkit-incubator/source/detail?r=1466

 --
 There are only 10 types of people in the world: Those who understand
 binary, and those who don't





 --
 There are only 10 types of people in the world: Those who understand
 binary, and those who don't








 --
 There are only 10 types of people in the world: Those who understand
 binary, and those who don't

 


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



[gwt-contrib] Re: [google-web-toolkit commit] r4603 - trunk/doc

2009-02-03 Thread Freeland Abbott
Plausibly, yes.  I'll merge.

On Tue, Feb 3, 2009 at 1:08 PM, Scott Blum sco...@google.com wrote:

 Shouldn't this have gone into 1.6?

 On Tue, Feb 3, 2009 at 11:15 AM, codesite-nore...@google.com wrote:

 Author: fabb...@google.com
 Date: Tue Feb  3 08:14:45 2009
 New Revision: 4603

 Modified:
trunk/doc/build.xml

 Log:
 Whitelisting the new event packages for javadoc.  (This should be a
 blacklist instead, but that's a TODO.)

 Review by: ecc


 Modified: trunk/doc/build.xml

 ==
 --- trunk/doc/build.xml (original)
 +++ trunk/doc/build.xml Tue Feb  3 08:14:45 2009
 @@ -10,7 +10,7 @@
property.ensure name=gwt.dev.jar
 location=${gwt.build.lib}/gwt-dev-linux.jar /

property name=USER_PKGS
 -

 value=com.google.gwt.core.client;com.google.gwt.core.ext;com.google.gwt.core.ext.soyc;com.google.gwt.core.ext.linker;com.google.gwt.core.ext.typeinfo;com.google.gwt.dom.client;com.google.gwt.i18n.client;com.google.gwt.i18n.rebind.format;com.google.gwt.i18n.rebind.keygen;com.google.gwt.json.client;com.google.gwt.junit.client;com.google.gwt.benchmarks.client;com.google.gwt.user.client;com.google.gwt.user.client.rpc;com.google.gwt.user.client.ui;com.google.gwt.user.server.rpc;com.google.gwt.xml.client;com.google.gwt.http.client;com.google.gwt.animation.client
 /
 +

 value=com.google.gwt.core.client;com.google.gwt.core.ext;com.google.gwt.core.ext.soyc;com.google.gwt.core.ext.linker;com.google.gwt.core.ext.typeinfo;com.google.gwt.dom.client;com.google.gwt.i18n.client;com.google.gwt.i18n.rebind.format;com.google.gwt.i18n.rebind.keygen;com.google.gwt.json.client;com.google.gwt.junit.client;com.google.gwt.benchmarks.client;com.google.gwt.user.client;com.google.gwt.user.client.rpc;com.google.gwt.user.client.ui;com.google.gwt.user.server.rpc;com.google.gwt.xml.client;com.google.gwt.http.client;com.google.gwt.animation.client;com.google.gwt.event.dom.client;com.google.gwt.event.logical.shared;com.google.gwt.event.shared;com.google.gwt.debug.client;com.google.gwt.user.datepicker.client
 /
property name=LANG_PKGS
 value=java.lang;java.lang.annotation;java.util;java.io;java.sql /

!--Individual classes to include when we don't want to

 



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



[gwt-contrib] Re: IE6 and Grid Performance

2009-02-03 Thread David
Hi John,
I know about incubator and we are using PagingScrollTable in other places
where the data can be much bigger.

But the point that I was trying to report: some operations that do bulk
operations in the Grid can be optimized a bit better by detaching from the
document and reattaching automatically. Maybe that could somehow be done
behind the scenes when doing a resize. The out-of-the-box experience would
be much better - when doing a prototype to see if a technology is stable
enough to be used, these kind of issues leave a bad impression on people
trying out what could be achieved.

Now that I know that it has a huge impact, I will do so myself in my custom
listbox... and in the next step I will upgrade the component to a
GridBulkRenderer, but that will have impact on the API of the component
since it supports custom rendering in the listbox.

The biggest issue I have with incubator is that with every release we have
to update our code:
- Class names change
- Package names change (gen2)
- methods are renamed or refactored
- Event mechanism has changed half way.

We have a deadline to meet and incubator widgets are just to volatile for
the moment. The Table we already started using but only after shielding off
everything about the incubator because we can not afford to change the
applications all of the time (in total we have at least 5 big GWT projects
in development and many new ones are being defined for the future).


David

On Tue, Feb 3, 2009 at 5:21 PM, John LaBanca jlaba...@google.com wrote:

 The GridBulkRenderer in the GWT incubator allows you to generate a Grid as
 an HTML string, which is much faster than using DOM manipulation as the Grid
 currently does.  You can also use it with the ScrollTable, which add a fixed
 header to a scrolling body.  Or use the PagingScrollTable, which divides the
 rows into mulitple pages.

 You can find these widgets in the incubator project:
 http://code.google.com/p/google-web-toolkit-incubator/


 Thanks,
 John LaBanca
 jlaba...@google.com



 On Tue, Feb 3, 2009 at 11:16 AM, stuckagain david.no...@gmail.com wrote:


 Beloved GWT devs,

 I just finished tracking down a big performance issue in one of our
 application and I really fell that I have to post something about the
 problem here.

 As we all know the Grid is very slow if you need to show a large
 table. But what I did not know is that it makes an extreem big
 difference when the Grid is attached or not.

 I had a Grid with 2000 rows (1 column) populated before attaching the
 widget. That takes about 5 seconds. That is not great, but since this
 is a border case it is good enough since most instances will only use
 less than 10 rows.

 But... we had some logic that reset the grid to contain refreshed
 data, but this time the grid is populated while it was already
 attached to the browser document. It now took 250 SECONDS to show the
 exact some data.

 The easy solution (before switching over to bulk rendering) is to
 simply remove the Grid from the document, populate it with the 2000
 rows and put it back.

 Wouldn't it be nice that the components like the Grid would do such
 things automatically when doing big operations like resize on it ?

 David



 


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



[gwt-contrib] [google-web-toolkit commit] r4606 - releases/1.6

2009-02-03 Thread codesite-noreply

Author: fabb...@google.com
Date: Tue Feb  3 11:44:55 2009
New Revision: 4606

Modified:
releases/1.6/branch-info.txt

Log:
Recorded merge of trunk c4503 at c4505.  This would *probably* merge cleanly
regardless...



Modified: releases/1.6/branch-info.txt
==
--- releases/1.6/branch-info.txt(original)
+++ releases/1.6/branch-info.txtTue Feb  3 11:44:55 2009
@@ -27,6 +27,7 @@
  /releases/1.6/@r4359:4490 was merged (r4491) into trunk
  /releases/1.6/@c4498 was merged (r4499) into trunk
  /releases/1.6/@r4490:4497,4498:4511 was merged (r4512) into trunk,  
skipping c4498 (cherry picked above)
+/tr...@c4503 was merged (r4505) into /releases/1.6

  The next merge into trunk will be:
-svn merge -r4511:  
https://google-web-toolkit.googlecode.com/svn/releases/1.6 .
+svn merge -r4511:4505,4506:  
https://google-web-toolkit.googlecode.com/svn/releases/1.6 .

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



[gwt-contrib] [google-web-toolkit commit] r4605 - releases/1.6/doc

2009-02-03 Thread codesite-noreply
Author: fabb...@google.com
Date: Tue Feb  3 10:40:07 2009
New Revision: 4605

Modified:
releases/1.6/doc/build.xml

Log:
Down-merge of c4503 to trunk, adding new event stuff to the javadoc
whitelist.


Modified: releases/1.6/doc/build.xml
==
--- releases/1.6/doc/build.xml  (original)
+++ releases/1.6/doc/build.xml  Tue Feb  3 10:40:07 2009
@@ -10,7 +10,8 @@
property.ensure name=gwt.dev.jar  
location=${gwt.build.lib}/gwt-dev-linux.jar /

property name=USER_PKGS
-   
value=com.google.gwt.core.client;com.google.gwt.core.ext;com.google.gwt.core.ext.linker;com.google.gwt.core.ext.typeinfo;com.google.gwt.dom.client;com.google.gwt.i18n.client;com.google.gwt.i18n.rebind.format;com.google.gwt.i18n.rebind.keygen;com.google.gwt.json.client;com.google.gwt.junit.client;com.google.gwt.benchmarks.client;com.google.gwt.user.client;com.google.gwt.user.client.rpc;com.google.gwt.user.client.ui;com.google.gwt.user.server.rpc;com.google.gwt.xml.client;com.google.gwt.http.client;com.google.gwt.animation.client
  
/
+   
value=com.google.gwt.animation.client;com.google.gwt.benchmarks.client;com.google.gwt.core.client;com.google.gwt.core.ext;com.google.gwt.core.ext.linker;com.google.gwt.core.ext.typeinfo;com.google.gwt.debug.client;com.google.gwt.dom.client;com.google.gwt.event.dom.client;com.google.gwt.event.logical.shared;com.google.gwt.event.shared;com.google.gwt.http.client;com.google.gwt.i18n.client;com.google.gwt.i18n.rebind.format;com.google.gwt.i18n.rebind.keygen;com.google.gwt.json.client;com.google.gwt.junit.client;com.google.gwt.user.client;com.google.gwt.user.client.rpc;com.google.gwt.user.client.ui;com.google.gwt.user.datepicker.client;com.google.gwt.user.server.rpc;com.google.gwt.xml.client
  
/
+
property name=LANG_PKGS  
value=java.lang;java.lang.annotation;java.util;java.io;java.sql /

!--Individual classes to include when we don't want to

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



[gwt-contrib] [google-web-toolkit commit] r4608 - in releases/1.6/user/src/com/google/gwt/i18n: client client/impl rebind

2009-02-03 Thread codesite-noreply

Author: sco...@google.com
Date: Tue Feb  3 13:38:14 2009
New Revision: 4608

Modified:
releases/1.6/user/src/com/google/gwt/i18n/client/Constants.java
releases/1.6/user/src/com/google/gwt/i18n/client/impl/ConstantMap.java
 
releases/1.6/user/src/com/google/gwt/i18n/rebind/ConstantsMapMethodCreator.java

Log:
I18N constant maps are now guaranteed to iterate in declaration order.   
This allows a better degree of user control, and fixes inconsistencies  
between hosted and web mode.

Review by: jat (desk)


Modified: releases/1.6/user/src/com/google/gwt/i18n/client/Constants.java
==
--- releases/1.6/user/src/com/google/gwt/i18n/client/Constants.java  
(original)
+++ releases/1.6/user/src/com/google/gwt/i18n/client/Constants.java Tue  
Feb  3 13:38:14 2009
@@ -64,7 +64,7 @@
   *
   * {...@example com.google.gwt.examples.i18n.NumberFormatConstantsAnnot}
   * /p
- *
+ *
   * p
   * It is also possible to change the property name bound to a constant  
accessor
   * using the {...@code @Key} annotation. For example,
@@ -152,7 +152,8 @@
   * the constant accessor codesomeMap()/code would return a
   * codeMap/code that maps codea/code onto codeX/code,
   * codeb/code onto codeY/code, and codec/code onto
- * codeZ/code.
+ * codeZ/code. Iterating through this codeMap/code will return
+ * the keys or entries in declaration order.
   * /p
   *
   * pThe benefit of using annotations, aside from not having to switch to

Modified:  
releases/1.6/user/src/com/google/gwt/i18n/client/impl/ConstantMap.java
==
--- releases/1.6/user/src/com/google/gwt/i18n/client/impl/ConstantMap.java  
 
(original)
+++ releases/1.6/user/src/com/google/gwt/i18n/client/impl/ConstantMap.java  
 
Tue Feb  3 13:38:14 2009
@@ -20,10 +20,9 @@
  import java.util.AbstractMap;
  import java.util.AbstractSet;
  import java.util.Arrays;
-import java.util.Collections;
-import java.util.HashMap;
  import java.util.Iterator;
  import java.util.Map;
+import java.util.NoSuchElementException;
  import java.util.Set;

  /**
@@ -33,10 +32,62 @@
   */
  public class ConstantMap extends AbstractMapString, String {

-  /**
-   * A cache of a synthesized entry set.
-   */
-  private SetMap.EntryString, String entries;
+  private static final class EntryImpl implements EntryString, String {
+private final String key;
+private final String value;
+
+private EntryImpl(String key, String value) {
+  assert (key != null);
+  assert (value != null);
+  this.key = key;
+  this.value = value;
+}
+
+@Override
+public boolean equals(Object o) {
+  if (o instanceof Map.Entry) {
+Map.Entry?, ? other = (Map.Entry?, ?) o;
+// Key and value known to be non-null.
+if (key.equals(other.getKey())  value.equals(other.getValue())) {
+  return true;
+}
+  }
+  return false;
+}
+
+public String getKey() {
+  return key;
+}
+
+public String getValue() {
+  return value;
+}
+
+/**
+ * Calculate the hash code using Sun's specified algorithm.
+ */
+@Override
+public int hashCode() {
+  int keyHash = 0;
+  int valueHash = 0;
+  if (getKey() != null) {
+keyHash = getKey().hashCode();
+  }
+  if (getValue() != null) {
+valueHash = getValue().hashCode();
+  }
+  return keyHash ^ valueHash;
+}
+
+public String setValue(String value) {
+  throw new UnsupportedOperationException();
+}
+
+@Override
+public String toString() {
+  return key + = + value;
+}
+  }

/**
 * The original set of keys.
@@ -56,6 +107,8 @@
  init();

  for (int i = 0; i  keys.length; ++i) {
+  assert keys[i] != null;
+  assert values[i] != null;
putImpl(keys[i], values[i]);
  }
}
@@ -67,14 +120,48 @@

@Override
public SetMap.EntryString, String entrySet() {
-if (entries == null) {
-  MapString, String copy = new HashMapString, String();
-  for (String key : keys) {
-copy.put(key, get(key));
+return new AbstractSetEntryString, String() {
+  @Override
+  public boolean contains(Object o) {
+if (!(o instanceof Entry)) {
+  return false;
+}
+Entry?, ? other = (Entry?, ?) o;
+String value = get(other.getKey());
+if (value != null  value.equals(other.getValue())) {
+  return true;
+}
+return false;
}
-  entries = Collections.unmodifiableMap(copy).entrySet();
-}
-return entries;
+
+  @Override
+  public IteratorMap.EntryString, String iterator() {
+return new IteratorEntryString, String() {
+  private int next = 0;
+
+  public boolean hasNext() {
+return next  ConstantMap.this.size();
+  }
+
+  public EntryString, 

[gwt-contrib] [google-web-toolkit commit] r4612 - releases/1.6/user/src/com/google/gwt/user/client/ui

2009-02-03 Thread codesite-noreply

Author: jlaba...@google.com
Date: Tue Feb  3 15:13:07 2009
New Revision: 4612

Modified:
releases/1.6/user/src/com/google/gwt/user/client/ui/Tree.java

Log:
Clicking on the left or right of a TreeItem now focuses on the Tree and  
enables Keyboard support.  Previously, the item appeared selected, but  
keyboard support wouldn't work.

Patch by: jlabanca
Review by: ecc (desk)



Modified: releases/1.6/user/src/com/google/gwt/user/client/ui/Tree.java
==
--- releases/1.6/user/src/com/google/gwt/user/client/ui/Tree.java   
(original)
+++ releases/1.6/user/src/com/google/gwt/user/client/ui/Tree.java   Tue Feb 
  
3 15:13:07 2009
@@ -516,8 +516,7 @@
// The click event should have given focus to this element  
already.
// Avoid moving focus back up to the tree (so that focusable  
widgets
// attached to TreeItems can receive keyboard events).
-} else if (curSelection != null
- curSelection.getContentElem().isOrHasChild(e)) {
+} else if (curSelection != null) {
setFocus(true);
  }
  break;

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



[gwt-contrib] [google-web-toolkit commit] r4615 - releases/1.6/samples/showcase/src/com/google/gwt/sample/showcase/client

2009-02-03 Thread codesite-noreply

Author: sco...@google.com
Date: Tue Feb  3 15:44:15 2009
New Revision: 4615

Modified:
 
releases/1.6/samples/showcase/src/com/google/gwt/sample/showcase/client/Application.java

Log:
Fixes an uncaught exception generated trying to set TD widths to  
non-positive values.

Review by: jlabanca

Modified:  
releases/1.6/samples/showcase/src/com/google/gwt/sample/showcase/client/Application.java
==
---  
releases/1.6/samples/showcase/src/com/google/gwt/sample/showcase/client/Application.java
 
(original)
+++  
releases/1.6/samples/showcase/src/com/google/gwt/sample/showcase/client/Application.java
 
Tue Feb  3 15:44:15 2009
@@ -62,8 +62,7 @@
   *
   * li.Application-menu { The main menu }/li
   *
- * li.Application-content-wrapper { The scrollable element around the  
content
- * }/li
+ * li.Application-content-wrapper { The scrollable element around the  
content }/li
   *
   * /ul
   */
@@ -293,8 +292,8 @@

protected void onWindowResizedImpl(int width) {
  int menuWidth = mainMenu.getOffsetWidth();
-int contentWidth = width - menuWidth - 30;
-int contentWidthInner = contentWidth - 10;
+int contentWidth = Math.max(width - menuWidth - 30, 1);
+int contentWidthInner = Math.max(contentWidth - 10, 1);
  bottomPanel.setCellWidth(mainMenu, menuWidth + px);
  bottomPanel.setCellWidth(contentDecorator, contentWidth + px);
  contentLayout.getCellFormatter().setWidth(0, 0, contentWidthInner  
+ px);

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



[gwt-contrib] [google-web-toolkit commit] r4611 - in releases/1.6/user: src/com/google/gwt/user/client/ui test/com/google/gwt/user/client/ui

2009-02-03 Thread codesite-noreply

Author: sco...@google.com
Date: Tue Feb  3 15:10:48 2009
New Revision: 4611

Modified:
releases/1.6/user/src/com/google/gwt/user/client/ui/CheckBox.java
releases/1.6/user/test/com/google/gwt/user/client/ui/CheckBoxTest.java

Log:
Fixes a bug where checkboxes would not retain their value on IE when  
detached.  We were accidentally short-circuiting the logic that would set  
the default checked property during widget unload.

Review by: rjrjr (desk)


Modified: releases/1.6/user/src/com/google/gwt/user/client/ui/CheckBox.java
==
--- releases/1.6/user/src/com/google/gwt/user/client/ui/CheckBox.java
(original)
+++ releases/1.6/user/src/com/google/gwt/user/client/ui/CheckBox.java   Tue  
Feb  3 15:10:48 2009
@@ -303,11 +303,12 @@
throw new IllegalArgumentException(value must not be null);
  }

-if (value.equals(getValue())) {
-  return;
-}
+Boolean oldValue = getValue();
  inputElem.setChecked(value);
  inputElem.setDefaultChecked(value);
+if (value.equals(oldValue)) {
+  return;
+}
  if (fireEvents) {
ValueChangeEvent.fire(this, value);
  }

Modified:  
releases/1.6/user/test/com/google/gwt/user/client/ui/CheckBoxTest.java
==
--- releases/1.6/user/test/com/google/gwt/user/client/ui/CheckBoxTest.java  
 
(original)
+++ releases/1.6/user/test/com/google/gwt/user/client/ui/CheckBoxTest.java  
 
Tue Feb  3 15:10:48 2009
@@ -119,6 +119,20 @@
  UIObjectTest.assertDebugIdContents(myCheck-label, myLabel);
}

+  /**
+   * Tests that detaching and attaching a CheckBox widget retains the  
checked
+   * state of the element. This is known to be tricky on IE.
+   */
+  public void testDetachment() {
+InputElement elm = DOM.createInputCheck().cast();
+CheckBox box = new CheckBox(elm.Element cast());
+RootPanel.get().add(box);
+elm.setChecked(true);
+RootPanel.get().remove(box);
+RootPanel.get().add(box);
+assertTrue(elm.isChecked());
+  }
+
public void testFormValue() {
  InputElement elm = Document.get().createCheckInputElement();
  Element asOldElement = elm.cast();

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



[gwt-contrib] [google-web-toolkit commit] r4613 - releases/1.6/samples/dynatable/src/com/google/gwt/sample/dynatable

2009-02-03 Thread codesite-noreply

Author: sco...@google.com
Date: Tue Feb  3 15:42:11 2009
New Revision: 4613

Modified:
 
releases/1.6/samples/dynatable/src/com/google/gwt/sample/dynatable/DynaTable.gwt.xml

Log:
Disable servlet tag in DynaTable.gwt.xml until we support web.xml  
validation to avoid hosted mode warning.

Modified:  
releases/1.6/samples/dynatable/src/com/google/gwt/sample/dynatable/DynaTable.gwt.xml
==
---  
releases/1.6/samples/dynatable/src/com/google/gwt/sample/dynatable/DynaTable.gwt.xml
 
(original)
+++  
releases/1.6/samples/dynatable/src/com/google/gwt/sample/dynatable/DynaTable.gwt.xml
 
Tue Feb  3 15:42:11 2009
@@ -13,9 +13,10 @@
  !-- limitations under the  
License. --

  module rename-to=dynatable
-   inherits name='com.google.gwt.user.User'/
-   entry-point class='com.google.gwt.sample.dynatable.client.DynaTable'/
-   servlet path='/calendar'  
class='com.google.gwt.sample.dynatable.server.SchoolCalendarServiceImpl'/
+   inherits name='com.google.gwt.user.User' /
+   entry-point class='com.google.gwt.sample.dynatable.client.DynaTable' /
+   !--
+   Re-enable this when we have web.xml validation.
+   servlet path='/calendar'  
class='com.google.gwt.sample.dynatable.server.SchoolCalendarServiceImpl'/
+   --
  /module
-
-

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



[gwt-contrib] [google-web-toolkit commit] r4610 - releases/1.6/user/test/com/google/gwt/user/client/ui

2009-02-03 Thread codesite-noreply

Author: sco...@google.com
Date: Tue Feb  3 15:08:14 2009
New Revision: 4610

Modified:
releases/1.6/user/test/com/google/gwt/user/client/ui/CheckBoxTest.java

Log:
Sort  format.

Modified:  
releases/1.6/user/test/com/google/gwt/user/client/ui/CheckBoxTest.java
==
--- releases/1.6/user/test/com/google/gwt/user/client/ui/CheckBoxTest.java  
 
(original)
+++ releases/1.6/user/test/com/google/gwt/user/client/ui/CheckBoxTest.java  
 
Tue Feb  3 15:08:14 2009
@@ -96,6 +96,14 @@
  assertEquals(valuable, cb.getFormValue());
}

+  public void testConstructorInputElement() {
+InputElement elm = DOM.createInputCheck().cast();
+CheckBox box = new CheckBox(elm.Element cast());
+assertFalse(box.getValue());
+elm.setDefaultChecked(true);
+assertTrue(box.getValue());
+  }
+
public void testDebugId() {
  CheckBox check = new CheckBox(myLabel);

@@ -111,44 +119,6 @@
  UIObjectTest.assertDebugIdContents(myCheck-label, myLabel);
}

-  public void testConstructorInputElement() {
-InputElement elm = DOM.createInputCheck().cast();
-CheckBox box = new CheckBox(elm.Element cast());
-assertFalse(box.getValue());
-elm.setDefaultChecked(true);
-assertTrue(box.getValue());
-  }
-
-  public void testReplaceInputElement() {
-cb.setValue(true);
-cb.setTabIndex(1234);
-cb.setEnabled(false);
-cb.setAccessKey('k');
-cb.setFormValue(valuable);
-
-InputElement elm = Document.get().createCheckInputElement();
-assertFalse(elm.isChecked());
-
-Element asOldElement = elm.cast();
-cb.replaceInputElement(asOldElement);
-
-// The values should be preserved
-assertTrue(cb.getValue());
-assertEquals(1234, cb.getTabIndex());
-assertFalse(cb.isEnabled());
-assertEquals(k, elm.getAccessKey());
-assertEquals(valuable, cb.getFormValue());
-
-assertTrue(elm.isChecked());
-cb.setValue(false);
-assertFalse(elm.isChecked());
-
-elm.setChecked(true);
-assertTrue(cb.getValue());
-
-// TODO: When event creation is in, test that click on the new element  
works
-  }
-
public void testFormValue() {
  InputElement elm = Document.get().createCheckInputElement();
  Element asOldElement = elm.cast();
@@ -180,6 +150,36 @@
  cb.removeClickListener(r2);
  ListenerTester.fire();
  assertEquals(ListenerTester.fired, 0);
+  }
+
+  public void testReplaceInputElement() {
+cb.setValue(true);
+cb.setTabIndex(1234);
+cb.setEnabled(false);
+cb.setAccessKey('k');
+cb.setFormValue(valuable);
+
+InputElement elm = Document.get().createCheckInputElement();
+assertFalse(elm.isChecked());
+
+Element asOldElement = elm.cast();
+cb.replaceInputElement(asOldElement);
+
+// The values should be preserved
+assertTrue(cb.getValue());
+assertEquals(1234, cb.getTabIndex());
+assertFalse(cb.isEnabled());
+assertEquals(k, elm.getAccessKey());
+assertEquals(valuable, cb.getFormValue());
+
+assertTrue(elm.isChecked());
+cb.setValue(false);
+assertFalse(elm.isChecked());
+
+elm.setChecked(true);
+assertTrue(cb.getValue());
+
+// TODO: When event creation is in, test that click on the new element  
works
}

@SuppressWarnings(deprecation)

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



[gwt-contrib] FastTree gen2 tweaks

2009-02-03 Thread ecc

Reviewers: nwolf,

Description:
This patch fixes the dependencies for FastTree, removes dependencies on
deprecated gwt 1.6 classes, and adds the css using the interim structure
we've fallen back on until the next time.

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

Affected files:
   src/com/google/gwt/gen2/complexpanel/ComplexPanel.gwt.xml
   src/com/google/gwt/gen2/complexpanel/client/FastTree.java
   src/com/google/gwt/gen2/complexpanel/client/FastTreeItem.java
   src/com/google/gwt/gen2/widgetbase/Css_debug.gwt.xml
   src/com/google/gwt/gen2/widgetbase/client/Gen2CssInjector.java
   src/com/google/gwt/gen2/widgetbase/public/FastTree.css
   src/com/google/gwt/gen2/widgetbase/public/treeClosed.gif
   src/com/google/gwt/gen2/widgetbase/public/treeOpen.gif



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



[gwt-contrib] Re: IE6 and Grid Performance

2009-02-03 Thread Emily Crutcher
One warning for you, the performance characteristics of having a grid be
attached or detached can be very different for Firefox and IE. If you are
trying to use this technique in your own code, you might want to double
check the effect on both browsers.

In terms of gwt-incubator, we are brainstorming on ways to let our users
know which widgets/libraries are relatively stable (if they were perfectly
stable they would have graduated already)  and which are still wildly
fluctuating, once we have a proposal, I will be sending it out on this list,
so stay tuned.

Even for relatively stable widgets though, I think having a facade around
them is probably the smartest way to use them, so I'm glad your group is
using that practice.

  Cheers,

  Emily







On Tue, Feb 3, 2009 at 2:45 PM, David david.no...@gmail.com wrote:

 Hi John,
 I know about incubator and we are using PagingScrollTable in other places
 where the data can be much bigger.

 But the point that I was trying to report: some operations that do bulk
 operations in the Grid can be optimized a bit better by detaching from the
 document and reattaching automatically. Maybe that could somehow be done
 behind the scenes when doing a resize. The out-of-the-box experience would
 be much better - when doing a prototype to see if a technology is stable
 enough to be used, these kind of issues leave a bad impression on people
 trying out what could be achieved.

 Now that I know that it has a huge impact, I will do so myself in my custom
 listbox... and in the next step I will upgrade the component to a
 GridBulkRenderer, but that will have impact on the API of the component
 since it supports custom rendering in the listbox.

 The biggest issue I have with incubator is that with every release we have
 to update our code:
 - Class names change
 - Package names change (gen2)
 - methods are renamed or refactored
 - Event mechanism has changed half way.

 We have a deadline to meet and incubator widgets are just to volatile for
 the moment. The Table we already started using but only after shielding off
 everything about the incubator because we can not afford to change the
 applications all of the time (in total we have at least 5 big GWT projects
 in development and many new ones are being defined for the future).


 David


 On Tue, Feb 3, 2009 at 5:21 PM, John LaBanca jlaba...@google.com wrote:

 The GridBulkRenderer in the GWT incubator allows you to generate a Grid as
 an HTML string, which is much faster than using DOM manipulation as the Grid
 currently does.  You can also use it with the ScrollTable, which add a fixed
 header to a scrolling body.  Or use the PagingScrollTable, which divides the
 rows into mulitple pages.

 You can find these widgets in the incubator project:
 http://code.google.com/p/google-web-toolkit-incubator/


 Thanks,
 John LaBanca
 jlaba...@google.com



 On Tue, Feb 3, 2009 at 11:16 AM, stuckagain david.no...@gmail.comwrote:


 Beloved GWT devs,

 I just finished tracking down a big performance issue in one of our
 application and I really fell that I have to post something about the
 problem here.

 As we all know the Grid is very slow if you need to show a large
 table. But what I did not know is that it makes an extreem big
 difference when the Grid is attached or not.

 I had a Grid with 2000 rows (1 column) populated before attaching the
 widget. That takes about 5 seconds. That is not great, but since this
 is a border case it is good enough since most instances will only use
 less than 10 rows.

 But... we had some logic that reset the grid to contain refreshed
 data, but this time the grid is populated while it was already
 attached to the browser document. It now took 250 SECONDS to show the
 exact some data.

 The easy solution (before switching over to bulk rendering) is to
 simply remove the Grid from the document, populate it with the 2000
 rows and put it back.

 Wouldn't it be nice that the components like the Grid would do such
 things automatically when doing big operations like resize on it ?

 David






 



-- 
There are only 10 types of people in the world: Those who understand
binary, and those who don't

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



[gwt-contrib] [google-web-toolkit commit] r4616 - in releases/1.6/samples: dynatable/src/com/google/gwt/sample/dynatable/client showcase/sr...

2009-02-03 Thread codesite-noreply

Author: sco...@google.com
Date: Tue Feb  3 15:44:49 2009
New Revision: 4616

Modified:
 
releases/1.6/samples/dynatable/src/com/google/gwt/sample/dynatable/client/DayFilterWidget.java
 
releases/1.6/samples/showcase/src/com/google/gwt/sample/showcase/client/content/widgets/CwRadioButton.java

Log:
Remove references to deprecated methods.

Review by: jlabanca

Modified:  
releases/1.6/samples/dynatable/src/com/google/gwt/sample/dynatable/client/DayFilterWidget.java
==
---  
releases/1.6/samples/dynatable/src/com/google/gwt/sample/dynatable/client/DayFilterWidget.java
   
(original)
+++  
releases/1.6/samples/dynatable/src/com/google/gwt/sample/dynatable/client/DayFilterWidget.java
   
Tue Feb  3 15:44:49 2009
@@ -44,7 +44,7 @@
addClickHandler(dayCheckBoxHandler);

// Initialize based on the calendar's current value.
-  setChecked(calendar.getDayIncluded(day));
+  setValue(calendar.getDayIncluded(day));
  }
}

@@ -52,9 +52,9 @@
  public void onClick(ClickEvent event) {
onClick((DayCheckBox) event.getSource());
  }
-
+
  public void onClick(DayCheckBox dayCheckBox) {
-  calendar.setDayIncluded(dayCheckBox.day, dayCheckBox.isChecked());
+  calendar.setDayIncluded(dayCheckBox.day, dayCheckBox.getValue());
  }
}

@@ -102,7 +102,7 @@
  for (int i = 0, n = outer.getWidgetCount(); i  n; ++i) {
Widget w = outer.getWidget(i);
if (w instanceof DayCheckBox) {
-((DayCheckBox) w).setChecked(checked);
+((DayCheckBox) w).setValue(checked);
  dayCheckBoxHandler.onClick((DayCheckBox) w);
}
  }

Modified:  
releases/1.6/samples/showcase/src/com/google/gwt/sample/showcase/client/content/widgets/CwRadioButton.java
==
---  
releases/1.6/samples/showcase/src/com/google/gwt/sample/showcase/client/content/widgets/CwRadioButton.java
   
(original)
+++  
releases/1.6/samples/showcase/src/com/google/gwt/sample/showcase/client/content/widgets/CwRadioButton.java
   
Tue Feb  3 15:44:49 2009
@@ -108,7 +108,7 @@
radioButton.ensureDebugId(cwRadioButton-sport-
+ sport.replaceAll( , ));
if (i == 2) {
-radioButton.setChecked(true);
+radioButton.setValue(true);
}
vPanel.add(radioButton);
  }

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



[gwt-contrib] Re: strange compiler error in trunk

2009-02-03 Thread Lex Spoon

Scott or Bob, could you thumb wrestle and have the loser review the
patch on this page?

http://code.google.com/p/google-web-toolkit/issues/detail?id=3304


It's a fix to unbreak Ext GWT, which I broke with my addBridgeMethods
patch (issue 3064, r4477).  The new patch is less clever and simply
copies the list of bridge methods over that the JDT already computes.

As far as this tell this unbreaks Ext GWT, causes no changes to
Showcase's compile, and passes the rest of our regression suite.


Lex

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



[gwt-contrib] [google-web-toolkit commit] r4620 - in releases/1.6/user: src/com/google/gwt/json/client test/com/google/gwt/json/client

2009-02-03 Thread codesite-noreply

Author: sco...@google.com
Date: Tue Feb  3 17:41:14 2009
New Revision: 4620

Modified:
releases/1.6/user/src/com/google/gwt/json/client/JSONObject.java
releases/1.6/user/test/com/google/gwt/json/client/JSONTest.java

Log:
Clarify that JSONObject.keySet() is immutable, fix bad test code that was  
taking advantage of the old implementation details.


Modified: releases/1.6/user/src/com/google/gwt/json/client/JSONObject.java
==
--- releases/1.6/user/src/com/google/gwt/json/client/JSONObject.java 
(original)
+++ releases/1.6/user/src/com/google/gwt/json/client/JSONObject.javaTue  
Feb  3 17:41:14 2009
@@ -110,7 +110,8 @@
}

/**
-   * Returns the set of properties defined on this JSONObject.
+   * Returns the set of properties defined on this JSONObject. The  
returned set
+   * is immutable.
 */
public SetString keySet() {
  final String[] keys = computeKeys();

Modified: releases/1.6/user/test/com/google/gwt/json/client/JSONTest.java
==
--- releases/1.6/user/test/com/google/gwt/json/client/JSONTest.java  
(original)
+++ releases/1.6/user/test/com/google/gwt/json/client/JSONTest.java Tue  
Feb  3 17:41:14 2009
@@ -55,14 +55,14 @@
private static void assertJSONObjectEquals(JSONObject expected,
JSONObject actual) {
  SetString actKeys = actual.keySet();
-for (String key : expected.keySet()) {
-  actKeys.remove(key);
+SetString expKeys = expected.keySet();
+assertEquals(expKeys.size(), actKeys.size());
+for (String key : expKeys) {
assertTrue(actual.containsKey(key));
JSONValue expValue = expected.get(key);
JSONValue actValue = actual.get(key);
assertJSONValueEquals(expValue, actValue);
  }
-assertEquals(0, actKeys.size());
}

private static void assertJSONValueEquals(JSONValue expected, JSONValue  
actual) {

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