Re: Why doesn't my custom widget work in chrome but perfectly in firefox?

2011-09-01 Thread Ingert Doe
Did you actually test that? Becouse I get the same problems, mouse
over works but mouseout won't fire in chrome..

On Aug 30, 4:33 pm, Sudhakar Abraham 
wrote:
> Use MouseMoveHander and MouseOutHandler  instead of
> MouseOverHandler,MouseOutHandler. See the following code. Hover the
> cursor to the div, the text  responds  to mouse over. Remove the
> cursor from div to get "bye mouse".
>
> S. Abrahamwww.DataStoreGwt.com
>
> package com.college.client;
> import com.google.gwt.event.dom.client.MouseMoveEvent;
> import com.google.gwt.event.dom.client.MouseMoveHandler;
> import com.google.gwt.event.dom.client.MouseOutEvent;
> import com.google.gwt.event.dom.client.MouseOutHandler;
> import com.google.gwt.user.client.ui.HTML;
> import com.google.gwt.user.client.ui.RootLayoutPanel;
>   public class MyWidget
>   {
>    private final HTML widget;
>    public MyWidget() {
>    widget = new HTML("Hello");
>    widget.addMouseMoveHandler(new MouseMoveHandler()
> {
>    @Override
>     public void onMouseMove(MouseMoveEvent event)
>     {
>      widget.setHTML("Mouse over");
>     }
>    });
>     widget.addMouseOutHandler(new MouseOutHandler()
> {
>     @Override
>     public void onMouseOut(MouseOutEvent event)
>     {
>      widget.setHTML("Bye mouse!");
>     }
>     });
>      RootLayoutPanel.get().add(widget);
>     }
>
>   }
>
> On Aug 30, 3:08 am, Ingert Doe  wrote:
>
>
>
>
>
>
>
> > Hello, Today I ran into some problems with a custom widget. I created
> > a new GWT project and made a small test widget to narrow down the
> > problem. Here is the test widget I wrote:
>
> > public class MyWidget extends Composite implements MouseOverHandler,
> > MouseOutHandler {
> >         private final HTML widget;
>
> >         public MyWidget() {
> >                 widget = new HTML("Hello");
> >                 widget.addDomHandler(this, MouseOverEvent.getType());
> >                 widget.addDomHandler(this, MouseOutEvent.getType());
> >                 initWidget(widget);
> >         }
>
> >         @Override
> >         public void onMouseOver(MouseOverEvent event) {
> >                 widget.setHTML("Mouse over");
> >         }
>
> >         @Override
> >         public void onMouseOut(MouseOutEvent event) {
> >                 widget.setHTML("Bye mouse!");
> >         }
>
> > }
>
> > In firefox, this code works as expected. When I hover the cursor over
> > the div, the text changes to "Mouse over", when I remove the cursor
> > from the div, the text changes to "Bye mouse!".
>
> > In Chrome, only the onMouseOver handler is executed. To be perfectly
> > clear: When I hover the cursor over the div, the text changes to
> > "Mouse over", but when I remove the cursor from the div, the text does
> > Not change to "Bye mouse!".
> > If I comment out the addDomHandler for MouseOver, the MouseOut works.
>
> > I have also tried (as suggested on different forums) to only implement
> > the HasMouseOverHandlers and HasMouseOutHanders on my widget,
> > overriding the addMouse*Handler and using a separate class for
> > implementing the MouseOverHander/MouseOutHandler but I get the same
> > results here. Works perfectly in ff but only one handler works in
> > chrome.
>
> > Am I doing anything wrong in the code above? Is there another way I
> > can write the code to get the it more cross-browser compliant?
>
> > Thank you!

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



Why doesn't my custom widget work in chrome but perfectly in firefox?

2011-08-29 Thread Ingert Doe
Hello, Today I ran into some problems with a custom widget. I created
a new GWT project and made a small test widget to narrow down the
problem. Here is the test widget I wrote:

public class MyWidget extends Composite implements MouseOverHandler,
MouseOutHandler {
private final HTML widget;

public MyWidget() {
widget = new HTML("Hello");
widget.addDomHandler(this, MouseOverEvent.getType());
widget.addDomHandler(this, MouseOutEvent.getType());
initWidget(widget);
}

@Override
public void onMouseOver(MouseOverEvent event) {
widget.setHTML("Mouse over");
}

@Override
public void onMouseOut(MouseOutEvent event) {
widget.setHTML("Bye mouse!");
}
}



In firefox, this code works as expected. When I hover the cursor over
the div, the text changes to "Mouse over", when I remove the cursor
from the div, the text changes to "Bye mouse!".

In Chrome, only the onMouseOver handler is executed. To be perfectly
clear: When I hover the cursor over the div, the text changes to
"Mouse over", but when I remove the cursor from the div, the text does
Not change to "Bye mouse!".
If I comment out the addDomHandler for MouseOver, the MouseOut works.

I have also tried (as suggested on different forums) to only implement
the HasMouseOverHandlers and HasMouseOutHanders on my widget,
overriding the addMouse*Handler and using a separate class for
implementing the MouseOverHander/MouseOutHandler but I get the same
results here. Works perfectly in ff but only one handler works in
chrome.

Am I doing anything wrong in the code above? Is there another way I
can write the code to get the it more cross-browser compliant?

Thank you!

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



Failed to read file /._.jar - What could be wrong?

2011-07-14 Thread Ingert Doe
Hi! I want to use the google-api-java-client on the server-side in a
GWT/GAE project but I keep getting strange errors in the console when
I do a test run of my code.

To rule out any other factors, I'v created a new GWT/GAE project (with
the GWT project sample). I added references to the google-api-java-
client (project->properties->java build path-> libraries in eclipse).
I also set the "Source attachment" to the source jars, as mentioned on
the google-api-java-client setup page (http://code.google.com/p/google-
api-java-client/wiki/Setup) and copied the required jars to the war/
lib directory.

I then added the simple youtube example (http://code.google.com/p/
google-api-java-client/wiki/SampleProgram) to my GreetingServiceImpl
method and tweaked it to return the answer of the query to the client.
When I select "Debug as -> Web Application" I get a series of (to me)
strange warnings in the console that I hope someone here can help me
solve.

Notice that all warnings follow a simular pattern:
1) All libraries pertaining to google-api-java-client are affected
(nothing else)
2) The warnings say they can't open ._.jar which is the thing
that confuses me the most, does anyone know what this means?

--- snip ---

[WARN] Failed to read file: /Volumes/PROJECTS/workspace/GApiTest/war/
WEB-INF/lib/._google-api-client-1.4.1-beta.jar
java.util.zip.ZipException: error in opening zip file
at java.util.zip.ZipFile.open(Native Method)
at java.util.zip.ZipFile.(ZipFile.java:127)
at java.util.jar.JarFile.(JarFile.java:135)
at java.util.jar.JarFile.(JarFile.java:99)
at
org.mortbay.jetty.webapp.TagLibConfiguration.configureWebApp(TagLibConfiguration.java:
174)
at
org.mortbay.jetty.webapp.WebAppContext.startContext(WebAppContext.java:
1247)
at
org.mortbay.jetty.handler.ContextHandler.doStart(ContextHandler.java:
517)
at org.mortbay.jetty.webapp.WebAppContext.doStart(WebAppContext.java:
467)
at
org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:
50)
at
org.mortbay.jetty.handler.HandlerWrapper.doStart(HandlerWrapper.java:
130)
at
org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:
50)
at
org.mortbay.jetty.handler.HandlerWrapper.doStart(HandlerWrapper.java:
130)
at org.mortbay.jetty.Server.doStart(Server.java:224)
at
org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:
50)
at
com.google.appengine.tools.development.JettyContainerService.startContainer(JettyContainerService.java:
186)
at
com.google.appengine.tools.development.AbstractContainerService.startup(AbstractContainerService.java:
162)
at
com.google.appengine.tools.development.DevAppServerImpl.start(DevAppServerImpl.java:
172)
at
com.google.appengine.tools.development.gwt.AppEngineLauncher.start(AppEngineLauncher.java:
119)
at com.google.gwt.dev.DevMode.doStartUpServer(DevMode.java:500)
at com.google.gwt.dev.DevModeBase.startUp(DevModeBase.java:1055)
at com.google.gwt.dev.DevModeBase.run(DevModeBase.java:804)
at com.google.gwt.dev.DevMode.main(DevMode.java:309)

--- snip ---

Warnings continue for all jars in the google-api-java-client package
(including all dependencies)

._google-api-client-extensions-1.4.1-beta.jar
._google-api-client-googleapis-1.4.1-beta.jar
._google-api-client-googleapis-extensions-1.4.1-beta.jar
._commons-codec-1.3.jar
._commons-logging-1.1.1.jar
._gson-1.6.jar
._guava-r09.jar
._httpclient-4.0.3.jar
._httpcore-4.0.1.jar
._jackson-core-asl-1.6.7.jar
._jsr305-1.3.9.jar
._junit-4.8.2.jar
._servlet-api-2.5.jar
._transaction-api-1.1.jar
._xmlParserAPIs-2.6.2.jar
._xpp3-1.1.4c.jar


Note the code actually works fine and I get no errors/warnings in the
console after the app has launched, but these initial warnings confuse
me

-- 
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: Why won't the GWT 2.1 MVP example compile?

2010-12-18 Thread Ingert Doe
That's right. I forgot to add the following line to my
.gwt.xml file:



On Dec 15, 5:16 pm, Y2i  wrote:
> It looks like you didn't inherit com.google.gwt.activity.Activity
> module
>
> On Dec 14, 2:23 pm, Ingert Doe  wrote:
>
>
>
> > Hello! I have just spent hours trying to get the GWT 2.1 MVP example
> > to compile but it just won't work. I can't for the life of me
> > understand what is wrong here. This is what I have done:
>
> > * I created a new GWT 2.1 project in eclipse (3.6)
> > * I compile the default "Hello Server" code that is generated, and it
> > works, no problem
> > * I followed the GWT 2.1 MVP tutorial and added the classes to my
> > project, one by one.
>
> > Now when I try to compile I get the following error output:
>
> > Compiling module org.mem.GWT21Test
> >    Validating newly compiled units
> >       [ERROR] Errors in 'file:/Users/ingertd/Documents/workspace/
> > GWT21Test/src/org/mem/client/AppActivityMapper.java'
> >          [ERROR] Line 7: No source code is available for type
> > com.google.gwt.activity.shared.ActivityMapper; did you forget to
> > inherit a required module?
> >          [ERROR] Line 16: No source code is available for type
> > com.google.gwt.activity.shared.Activity; did you forget to inherit a
> > required module?
> >          [ERROR] Line 16: No source code is available for type
> > com.google.gwt.place.shared.Place; did you forget to inherit a
> > required module?
> >       [ERROR] Errors in 'file:/Users/ingertd/Documents/workspace/
> > GWT21Test/src/org/mem/client/AppPlaceHistoryMapper.java'
> >          [ERROR] Line 7: No source code is available for type
> > com.google.gwt.place.shared.PlaceHistoryMapper; did you forget to
> > inherit a required module?
> >       [ERROR] Errors in 'file:/Users/ingertd/Documents/workspace/
> > GWT21Test/src/org/mem/client/ClientFactory.java'
> >          [ERROR] Line 8: No source code is available for type
> > com.google.gwt.place.shared.PlaceController; did you forget to inherit
> > a required module?
> >       [ERROR] Errors in 'file:/Users/ingertd/Documents/workspace/
> > GWT21Test/src/org/mem/client/ClientFactoryImpl.java'
> >          [ERROR] Line 9: No source code is available for type
> > com.google.gwt.place.shared.PlaceController; did you forget to inherit
> > a required module?
> >       [ERROR] Errors in 'file:/Users/ingertd/Documents/workspace/
> > GWT21Test/src/org/mem/client/GWT21Test.java'
> >          [ERROR] Line 15: No source code is available for type
> > com.google.gwt.place.shared.Place; did you forget to inherit a
> > required module?
> >          [ERROR] Line 21: No source code is available for type
> > com.google.gwt.place.shared.PlaceController; did you forget to inherit
> > a required module?
> >          [ERROR] Line 24: No source code is available for type
> > com.google.gwt.activity.shared.ActivityMapper; did you forget to
> > inherit a required module?
> >          [ERROR] Line 25: No source code is available for type
> > com.google.gwt.activity.shared.ActivityManager; did you forget to
> > inherit a required module?
> >          [ERROR] Line 30: No source code is available for type
> > com.google.gwt.place.shared.PlaceHistoryHandler; did you forget to
> > inherit a required module?
> >       [ERROR] Errors in 'file:/Users/ingertd/Documents/workspace/
> > GWT21Test/src/org/mem/client/GoodbyeActivity.java'
> >          [ERROR] Line 8: No source code is available for type
> > com.google.gwt.activity.shared.AbstractActivity; did you forget to
> > inherit a required module?
> >       [ERROR] Errors in 'file:/Users/ingertd/Documents/workspace/
> > GWT21Test/src/org/mem/client/GoodbyePlace.java'
> >          [ERROR] Line 6: No source code is available for type
> > com.google.gwt.place.shared.Place; did you forget to inherit a
> > required module?
> >          [ERROR] Line 17: No source code is available for type
> > com.google.gwt.place.shared.PlaceTokenizer; did you forget to
> > inherit a required module?
> >       [ERROR] Errors in 'file:/Users/ingertd/Documents/workspace/
> > GWT21Test/src/org/mem/client/HelloActivity.java'
> >          [ERROR] Line 8: No source code is available for type
> > com.google.gwt.activity.shared.AbstractActivity; did you forget to
> > inherit a required module?
> >          [ERROR] Line 26: No source code is available for type
> > com.google.gwt.place.shared.Place; did you forget to in

Why won't the GWT 2.1 MVP example compile?

2010-12-15 Thread Ingert Doe
Hello! I have just spent hours trying to get the GWT 2.1 MVP example
to compile but it just won't work. I can't for the life of me
understand what is wrong here. This is what I have done:

* I created a new GWT 2.1 project in eclipse (3.6)
* I compile the default "Hello Server" code that is generated, and it
works, no problem
* I followed the GWT 2.1 MVP tutorial and added the classes to my
project, one by one.

Now when I try to compile I get the following error output:


Compiling module org.mem.GWT21Test
   Validating newly compiled units
  [ERROR] Errors in 'file:/Users/ingertd/Documents/workspace/
GWT21Test/src/org/mem/client/AppActivityMapper.java'
 [ERROR] Line 7: No source code is available for type
com.google.gwt.activity.shared.ActivityMapper; did you forget to
inherit a required module?
 [ERROR] Line 16: No source code is available for type
com.google.gwt.activity.shared.Activity; did you forget to inherit a
required module?
 [ERROR] Line 16: No source code is available for type
com.google.gwt.place.shared.Place; did you forget to inherit a
required module?
  [ERROR] Errors in 'file:/Users/ingertd/Documents/workspace/
GWT21Test/src/org/mem/client/AppPlaceHistoryMapper.java'
 [ERROR] Line 7: No source code is available for type
com.google.gwt.place.shared.PlaceHistoryMapper; did you forget to
inherit a required module?
  [ERROR] Errors in 'file:/Users/ingertd/Documents/workspace/
GWT21Test/src/org/mem/client/ClientFactory.java'
 [ERROR] Line 8: No source code is available for type
com.google.gwt.place.shared.PlaceController; did you forget to inherit
a required module?
  [ERROR] Errors in 'file:/Users/ingertd/Documents/workspace/
GWT21Test/src/org/mem/client/ClientFactoryImpl.java'
 [ERROR] Line 9: No source code is available for type
com.google.gwt.place.shared.PlaceController; did you forget to inherit
a required module?
  [ERROR] Errors in 'file:/Users/ingertd/Documents/workspace/
GWT21Test/src/org/mem/client/GWT21Test.java'
 [ERROR] Line 15: No source code is available for type
com.google.gwt.place.shared.Place; did you forget to inherit a
required module?
 [ERROR] Line 21: No source code is available for type
com.google.gwt.place.shared.PlaceController; did you forget to inherit
a required module?
 [ERROR] Line 24: No source code is available for type
com.google.gwt.activity.shared.ActivityMapper; did you forget to
inherit a required module?
 [ERROR] Line 25: No source code is available for type
com.google.gwt.activity.shared.ActivityManager; did you forget to
inherit a required module?
 [ERROR] Line 30: No source code is available for type
com.google.gwt.place.shared.PlaceHistoryHandler; did you forget to
inherit a required module?
  [ERROR] Errors in 'file:/Users/ingertd/Documents/workspace/
GWT21Test/src/org/mem/client/GoodbyeActivity.java'
 [ERROR] Line 8: No source code is available for type
com.google.gwt.activity.shared.AbstractActivity; did you forget to
inherit a required module?
  [ERROR] Errors in 'file:/Users/ingertd/Documents/workspace/
GWT21Test/src/org/mem/client/GoodbyePlace.java'
 [ERROR] Line 6: No source code is available for type
com.google.gwt.place.shared.Place; did you forget to inherit a
required module?
 [ERROR] Line 17: No source code is available for type
com.google.gwt.place.shared.PlaceTokenizer; did you forget to
inherit a required module?
  [ERROR] Errors in 'file:/Users/ingertd/Documents/workspace/
GWT21Test/src/org/mem/client/HelloActivity.java'
 [ERROR] Line 8: No source code is available for type
com.google.gwt.activity.shared.AbstractActivity; did you forget to
inherit a required module?
 [ERROR] Line 26: No source code is available for type
com.google.gwt.place.shared.Place; did you forget to inherit a
required module?
  [ERROR] Errors in 'file:/Users/ingertd/Documents/workspace/
GWT21Test/src/org/mem/client/HelloPlace.java'
 [ERROR] Line 6: No source code is available for type
com.google.gwt.place.shared.Place; did you forget to inherit a
required module?
 [ERROR] Line 17: No source code is available for type
com.google.gwt.place.shared.PlaceTokenizer; did you forget to
inherit a required module?
  [ERROR] Errors in 'file:/Users/ingertd/Documents/workspace/
GWT21Test/src/org/mem/client/HelloView.java'
 [ERROR] Line 11: No source code is available for type
com.google.gwt.place.shared.Place; did you forget to inherit a
required module?
   Finding entry point classes
  [ERROR] Unable to find type 'org.mem.client.GWT21Test'
 [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

What am I missing here?

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