[gwt-contrib] Re: Code Review: gwt-google-apis gears Making ResouceStore demo a bit prettier

2008-10-10 Thread Eric Ayers

Fixed whitespace issue - Thanks.  Committed as r877.

On Fri, Oct 10, 2008 at 9:41 AM, Miguel Méndez <[EMAIL PROTECTED]> wrote:
> That was the problem.  LGTM with one nit: ResourceStoreDemo line 41 has some
> additional whitespace.
>
> Nice cleanup.
> On Fri, Oct 10, 2008 at 9:32 AM, Eric Ayers <[EMAIL PROTECTED]> wrote:
>>
>> I didn't mention that this patch was against the releases/gears/1.1
>> branch - could that have been the problem?
>>
>> I just created a new diff on my Linux box and it looks slightly
>> different (attached).  Would you mind giving that one a try (r875)
>>
>> On Fri, Oct 10, 2008 at 9:24 AM, Miguel Méndez <[EMAIL PROTECTED]> wrote:
>> > The patch did not apply cleanly against r874.  Was that the revision
>> > against
>> > which the patch was built?  Here is the output:
>> >
>> > Hunk #3 FAILED at 85.
>> > 1 out of 6 hunks FAILED -- saving rejects to file
>> >
>> > samples/resourcestore/src/com/google/gwt/gears/sample/resourcestore/client/ResourceStoreDemo.java.rej
>> >
>> > The *.orig and *.rej files are attached.
>> > On Thu, Oct 9, 2008 at 2:54 PM, Eric Ayers <[EMAIL PROTECTED]> wrote:
>> >>
>> >> Hello Miguel,
>> >>
>> >> I'd like for you to review the attached patch (& screenshot)
>> >>
>> >> It changes the layout of the demo just a bit to put some margin around
>> >> the outside.
>> >> It also adds code to toggle the enable/disable state of the buttons to
>> >> match the user's actions.
>> >>
>> >> M
>> >>
>> >>  
>> >> samples/resourcestore/src/com/google/gwt/gears/sample/resourcestore/client/ResourceStoreDemo.java
>> >> M
>> >>
>> >>  
>> >> samples/resourcestore/src/com/google/gwt/gears/sample/resourcestore/public/ResourceStoreDemo.html
>> >>
>> >> -Eric.
>> >> --
>> >> Eric Z. Ayers - GWT Team - Atlanta, GA USA
>> >> http://code.google.com/webtoolkit/
>> >
>> >
>> >
>> > --
>> > Miguel
>> >
>>
>>
>>
>> --
>> Eric Z. Ayers - GWT Team - Atlanta, GA USA
>> http://code.google.com/webtoolkit/
>
>
>
> --
> Miguel
>



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

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



[gwt-contrib] Re: Code Review: gwt-google-apis gears Making ResouceStore demo a bit prettier

2008-10-10 Thread Miguel Méndez
That was the problem.  LGTM with one nit: ResourceStoreDemo line 41 has some
additional whitespace.

Nice cleanup.

On Fri, Oct 10, 2008 at 9:32 AM, Eric Ayers <[EMAIL PROTECTED]> wrote:

> I didn't mention that this patch was against the releases/gears/1.1
> branch - could that have been the problem?
>
> I just created a new diff on my Linux box and it looks slightly
> different (attached).  Would you mind giving that one a try (r875)
>
> On Fri, Oct 10, 2008 at 9:24 AM, Miguel Méndez <[EMAIL PROTECTED]> wrote:
> > The patch did not apply cleanly against r874.  Was that the revision
> against
> > which the patch was built?  Here is the output:
> >
> > Hunk #3 FAILED at 85.
> > 1 out of 6 hunks FAILED -- saving rejects to file
> >
> samples/resourcestore/src/com/google/gwt/gears/sample/resourcestore/client/ResourceStoreDemo.java.rej
> >
> > The *.orig and *.rej files are attached.
> > On Thu, Oct 9, 2008 at 2:54 PM, Eric Ayers <[EMAIL PROTECTED]> wrote:
> >>
> >> Hello Miguel,
> >>
> >> I'd like for you to review the attached patch (& screenshot)
> >>
> >> It changes the layout of the demo just a bit to put some margin around
> >> the outside.
> >> It also adds code to toggle the enable/disable state of the buttons to
> >> match the user's actions.
> >>
> >> M
> >>
>  
> samples/resourcestore/src/com/google/gwt/gears/sample/resourcestore/client/ResourceStoreDemo.java
> >> M
> >>
>  
> samples/resourcestore/src/com/google/gwt/gears/sample/resourcestore/public/ResourceStoreDemo.html
> >>
> >> -Eric.
> >> --
> >> Eric Z. Ayers - GWT Team - Atlanta, GA USA
> >> http://code.google.com/webtoolkit/
> >
> >
> >
> > --
> > Miguel
> >
>
>
>
> --
> Eric Z. Ayers - GWT Team - Atlanta, GA USA
> http://code.google.com/webtoolkit/
>



-- 
Miguel

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



[gwt-contrib] Re: Code Review: gwt-google-apis gears Making ResouceStore demo a bit prettier

2008-10-10 Thread Eric Ayers
I didn't mention that this patch was against the releases/gears/1.1
branch - could that have been the problem?

I just created a new diff on my Linux box and it looks slightly
different (attached).  Would you mind giving that one a try (r875)

On Fri, Oct 10, 2008 at 9:24 AM, Miguel Méndez <[EMAIL PROTECTED]> wrote:
> The patch did not apply cleanly against r874.  Was that the revision against
> which the patch was built?  Here is the output:
>
> Hunk #3 FAILED at 85.
> 1 out of 6 hunks FAILED -- saving rejects to file
> samples/resourcestore/src/com/google/gwt/gears/sample/resourcestore/client/ResourceStoreDemo.java.rej
>
> The *.orig and *.rej files are attached.
> On Thu, Oct 9, 2008 at 2:54 PM, Eric Ayers <[EMAIL PROTECTED]> wrote:
>>
>> Hello Miguel,
>>
>> I'd like for you to review the attached patch (& screenshot)
>>
>> It changes the layout of the demo just a bit to put some margin around
>> the outside.
>> It also adds code to toggle the enable/disable state of the buttons to
>> match the user's actions.
>>
>> M
>>  
>> samples/resourcestore/src/com/google/gwt/gears/sample/resourcestore/client/ResourceStoreDemo.java
>> M
>>  
>> samples/resourcestore/src/com/google/gwt/gears/sample/resourcestore/public/ResourceStoreDemo.html
>>
>> -Eric.
>> --
>> Eric Z. Ayers - GWT Team - Atlanta, GA USA
>> http://code.google.com/webtoolkit/
>
>
>
> --
> Miguel
>



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

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

M  samples/resourcestore/src/com/google/gwt/gears/sample/resourcestore/client/ResourceStoreDemo.java
M  samples/resourcestore/src/com/google/gwt/gears/sample/resourcestore/public/ResourceStoreDemo.html

Index: samples/resourcestore/src/com/google/gwt/gears/sample/resourcestore/client/ResourceStoreDemo.java
===
--- samples/resourcestore/src/com/google/gwt/gears/sample/resourcestore/client/ResourceStoreDemo.java	(revision 875)
+++ samples/resourcestore/src/com/google/gwt/gears/sample/resourcestore/client/ResourceStoreDemo.java	(working copy)
@@ -25,6 +25,7 @@
 import com.google.gwt.user.client.ui.HorizontalPanel;
 import com.google.gwt.user.client.ui.Label;
 import com.google.gwt.user.client.ui.RootPanel;
+import com.google.gwt.user.client.ui.VerticalPanel;
 import com.google.gwt.user.client.ui.Widget;
 
 /**
@@ -32,13 +33,13 @@
  * class.
  */
 public class ResourceStoreDemo implements EntryPoint {
-  private static final String RESOURCE_STORE_NAME = "helloworld-store";
   private static final String[] FILES_TO_CAPTURE = {
   getLocationPathName(), "resource.txt"};
+  private static final String RESOURCE_STORE_NAME = "helloworld-store";
 
   private static native String getLocationPathName() /*-{
-return $doc.location.href;
-  }-*/;
+ return $doc.location.href;
+   }-*/;
 
   private final HorizontalPanel buttonPanel = new HorizontalPanel();
   private final Button captureButton = new Button("Capture");
@@ -84,20 +85,27 @@
 buttonPanel.add(uncaptureButton);
 buttonPanel.add(removeStoreButton);
 
-RootPanel.get().add(buttonPanel);
-RootPanel.get().add(statusLabel);
+setButtons(true, false, false, false);
 
+VerticalPanel outerPanel = new VerticalPanel();
+outerPanel.add(buttonPanel);
+outerPanel.add(statusLabel);
+RootPanel.get("demo").add(outerPanel);
+
 localServer = Factory.getInstance().createLocalServer();
   }
 
   private void captureUrls() {
 statusLabel.setText("Capturing...");
+setButtons(false, false, false, false);
 resourceStore.capture(new ResourceStoreUrlCaptureHandler() {
   public void onCapture(ResourceStoreUrlCaptureEvent event) {
 if (event.isSuccess()) {
   statusLabel.setText("Captured URL: " + event.getUrl());
+  setButtons(false, true, true, true);
 } else {
   statusLabel.setText("Failed to capture URL: " + event.getUrl());
+  setButtons(true, false, false, false);
 }
   }
 }, FILES_TO_CAPTURE);
@@ -106,6 +114,7 @@
   private void createResourceStore() {
 resourceStore = localServer.createStore(RESOURCE_STORE_NAME);
 statusLabel.setText("Created a ResourceStore");
+setButtons(false, true, false, true);
   }
 
   private void removeStore() {
@@ -117,6 +126,7 @@
   statusLabel.setText("The store '" + RESOURCE_STORE_NAME
   + "' does not exist.");
 }
+setButtons(true, false, false, false);
   }
 
   private void removeURLs() {
@@ -125,5 +135,14 @@
   resourceStore.remove(url);
 }
 statusLabel.setText("Removed URLs from the store");
+setButtons(false, true, false, true);
   }
+
+  private void setButtons(boolean createStore, boolean capture,
+  boolean uncapture, boolean remove) {
+createStoreButton.setEnabled(createStore);
+  

[gwt-contrib] Re: Code Review: gwt-google-apis gears Making ResouceStore demo a bit prettier

2008-10-10 Thread Miguel Méndez
The patch did not apply cleanly against r874.  Was that the revision against
which the patch was built?  Here is the output:

Hunk #3 FAILED at 85.
1 out of 6 hunks FAILED -- saving rejects to file
samples/resourcestore/src/com/google/gwt/gears/sample/resourcestore/client/ResourceStoreDemo.java.rej


The *.orig and *.rej files are attached.

On Thu, Oct 9, 2008 at 2:54 PM, Eric Ayers <[EMAIL PROTECTED]> wrote:

> Hello Miguel,
>
> I'd like for you to review the attached patch (& screenshot)
>
> It changes the layout of the demo just a bit to put some margin around
> the outside.
> It also adds code to toggle the enable/disable state of the buttons to
> match the user's actions.
>
> M
>  
> samples/resourcestore/src/com/google/gwt/gears/sample/resourcestore/client/ResourceStoreDemo.java
> M
>  
> samples/resourcestore/src/com/google/gwt/gears/sample/resourcestore/public/ResourceStoreDemo.html
>
> -Eric.
> --
> Eric Z. Ayers - GWT Team - Atlanta, GA USA
> http://code.google.com/webtoolkit/
>



-- 
Miguel

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



ResourceStoreDemo.java.orig
Description: Binary data


ResourceStoreDemo.java.rej
Description: Binary data