Re: how to cancel a scheduled command?

2011-07-21 Thread Hamlet D';Arcy
Here is the answer:

The execute() method of Scheduler.RepeatingCommand returns a boolean.
If true, then the command will be invoked again. If false, it will be
cancelled.

  public interface RepeatingCommand {
/**
 * Returns true if the RepeatingCommand should be invoked again.
 */
boolean execute();
  }






On Jul 21, 2:13 pm, Jens  wrote:
> Hm I don't think so. But you can use GWT's Timer class instead. It has a
> cancel() method as well as a scheduleRepeating(int delayInMillis) method.
>
> -- J.

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



how to cancel a scheduled command?

2011-07-21 Thread Hamlet D';Arcy
I scheduled a command using:
Scheduler.get().scheduleFixedPeriod(RepeatingCommand, int);

Is there any way to cancel the command once scheduled?

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



Share a client-side singleton across modules?

2011-01-17 Thread Hamlet D';Arcy
I would like to share a client singleton across GWT modules. Is this
possible? If so, how?

I have several modules that need to share an EventBus (SimpleEventBus)
instance. Creating a singleton in GWT Java code and having all modules
inherit from the common module did not work. Each of the root modules
has a different instance of the EventBus.

I also tried using the replace-with and create() approach documented
in ClientFactory of GWT MVC and that did not work. Each module had
it's own instance.

Ideas?

Thanks in advance,

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



Re: StackPanel child not rendering in IE7 quirks

2010-04-08 Thread Hamlet D';Arcy
Yes, I am using StackLayoutPanel already. I meant StackLayoutPanel.



On Apr 7, 5:03 pm, kozura  wrote:
> You should be using aStackLayoutPanelif you're using
> DockLayoutPanels.
>
> Otherwise your issue may be similar to 
> this:http://code.google.com/p/google-web-toolkit/issues/detail?id=4694
>
> On Apr 7, 2:34 am, "Hamlet D'Arcy"  wrote:
>
>
>
> > The problem only occurs when a DockLayoutPanel is within the
> > StackPanel.
>
> > Does anyone know of issues with mixing StackPanel and
> > DockLayoutPanel?
>
> > On Apr 7, 9:32 am, "Hamlet D'Arcy"  wrote:
>
> > > Has anyone ever seen something like this before:
>
> > > I have a StackPanel in my application.
>
> > > On IE7 only, The first time I start my application in Tomcat, and
> > > navigate to the application in the browser, then the contents of the
> > > first stack panel renders correctly. If I hit refresh then the panel
> > > is invisible. The stack is visible, just the panel contents are
> > > hidden. Any subsequent refresh results in same. If I resize the
> > > window, then the panel renders just fine with no further problems for
> > > the live of the app. If I switch stacks and come back then the panel
> > > renders just fine with no further problems.
>
> > > This does not happen in IE6, IE8, any FF, Chrome, or Safari.
>
> > > Any ideas?

-- 
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-tool...@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: StackPanel child not rendering in IE7 quirks

2010-04-07 Thread Hamlet D';Arcy
The problem only occurs when a DockLayoutPanel is within the
StackPanel.

Does anyone know of issues with mixing StackPanel and
DockLayoutPanel?



On Apr 7, 9:32 am, "Hamlet D'Arcy"  wrote:
> Has anyone ever seen something like this before:
>
> I have a StackPanel in my application.
>
> On IE7 only, The first time I start my application in Tomcat, and
> navigate to the application in the browser, then the contents of the
> first stack panel renders correctly. If I hit refresh then the panel
> is invisible. The stack is visible, just the panel contents are
> hidden. Any subsequent refresh results in same. If I resize the
> window, then the panel renders just fine with no further problems for
> the live of the app. If I switch stacks and come back then the panel
> renders just fine with no further problems.
>
> This does not happen in IE6, IE8, any FF, Chrome, or Safari.
>
> Any ideas?

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



StackPanel child not rendering in IE7 quirks

2010-04-07 Thread Hamlet D';Arcy
Has anyone ever seen something like this before:

I have a StackPanel in my application.

On IE7 only, The first time I start my application in Tomcat, and
navigate to the application in the browser, then the contents of the
first stack panel renders correctly. If I hit refresh then the panel
is invisible. The stack is visible, just the panel contents are
hidden. Any subsequent refresh results in same. If I resize the
window, then the panel renders just fine with no further problems for
the live of the app. If I switch stacks and come back then the panel
renders just fine with no further problems.

This does not happen in IE6, IE8, any FF, Chrome, or Safari.

Any ideas?

-- 
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-tool...@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: Class loaded incorrectly in GwtTestCase: NoSuchMethodError

2010-04-01 Thread Hamlet D';Arcy
Alright, I figured this out. Ignat was correct after all... there was
an old version of my class in the classpath. After searching my entire
system for class files and cleaning up all the duplicates, this once
agains works.

Thanks,


On Apr 1, 1:25 pm, "Hamlet D'Arcy"  wrote:
> Thanks for the info Ignat.
>
> Unfortunately, this is not what is happening.
>
> The class is a class I wrote. There is no other version around. Plus,
> the class as loaded does not have the /wrong/ methods and fields on
> it, it has /no/ methods and fields on it.
>
> Anyone else have ideas?
>
> On Apr 1, 11:49 am, Ignat Alexeyenko 
> wrote:
>
>
>
> > Hi!
>
> > Have similar problems during module testing in Intellij IDEA.
> > My problem was I've used apache commons lang libraries that are also present
> > in gwt-dev-linux.jar (or gwt-dev.jar).
>
> > In my app everything worked fine, in tests older apache commons jar was
> > loaded first and there was no methods in correspondent CollectionUtils
> > apache class (because gwt-dev.jar has older version of CollectionUtils
> > class).
>
> > Hope this will be helpful.
>
> > --
> > Kind regards,
> > Ignat Alexeyenko.
>
> > On Thu, Apr 1, 2010 at 12:17 PM, Hamlet D'Arcy  wrote:
> > > I am receiving a NoSuchMethodError for one of my object's
> > > constructors. It only happens in a GWTTestCase.
>
> > > The object in question is called "MyClass" in package "com.example"
> > > The MyClass object does load, but the Class instance has no methods,
> > > no fields, and no constructors on it.
> > > There are other classes in that same package that load correctly.
> > > When I run within Tomcat the class loads correctly and is usable.
> > > When I run in GWT Hosted Mode the class loads correctly and is
> > > usable.
> > > When I run within the GwtTestCase the Class instance is missing all
> > > its fields, methods, and ctors.
>
> > > There is really nothing special about MyClass.
>
> > > The test case just uses GWT.create() to instantiate the remote service
> > > and then invokes a simple method on it.
>
> > > This is GWT 2.0.3 on 64 bit Ubuntu linux running in IntelliJ IDEA.
>
> > > Any ideas about what could be wrong?
>
> > > --
> > > 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-tool...@googlegroups.com.
> > > To unsubscribe from this group, send email to
> > > google-web-toolkit+unsubscr...@googlegroups.com > >  cr...@googlegroups.com>
> > > .
> > > For more options, visit this group at
> > >http://groups.google.com/group/google-web-toolkit?hl=en.

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to google-web-tool...@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: Class loaded incorrectly in GwtTestCase: NoSuchMethodError

2010-04-01 Thread Hamlet D';Arcy
Thanks for the info Ignat.

Unfortunately, this is not what is happening.

The class is a class I wrote. There is no other version around. Plus,
the class as loaded does not have the /wrong/ methods and fields on
it, it has /no/ methods and fields on it.

Anyone else have ideas?


On Apr 1, 11:49 am, Ignat Alexeyenko 
wrote:
> Hi!
>
> Have similar problems during module testing in Intellij IDEA.
> My problem was I've used apache commons lang libraries that are also present
> in gwt-dev-linux.jar (or gwt-dev.jar).
>
> In my app everything worked fine, in tests older apache commons jar was
> loaded first and there was no methods in correspondent CollectionUtils
> apache class (because gwt-dev.jar has older version of CollectionUtils
> class).
>
> Hope this will be helpful.
>
> --
> Kind regards,
> Ignat Alexeyenko.
>
>
>
> On Thu, Apr 1, 2010 at 12:17 PM, Hamlet D'Arcy  wrote:
> > I am receiving a NoSuchMethodError for one of my object's
> > constructors. It only happens in a GWTTestCase.
>
> > The object in question is called "MyClass" in package "com.example"
> > The MyClass object does load, but the Class instance has no methods,
> > no fields, and no constructors on it.
> > There are other classes in that same package that load correctly.
> > When I run within Tomcat the class loads correctly and is usable.
> > When I run in GWT Hosted Mode the class loads correctly and is
> > usable.
> > When I run within the GwtTestCase the Class instance is missing all
> > its fields, methods, and ctors.
>
> > There is really nothing special about MyClass.
>
> > The test case just uses GWT.create() to instantiate the remote service
> > and then invokes a simple method on it.
>
> > This is GWT 2.0.3 on 64 bit Ubuntu linux running in IntelliJ IDEA.
>
> > Any ideas about what could be wrong?
>
> > --
> > 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-tool...@googlegroups.com.
> > To unsubscribe from this group, send email to
> > google-web-toolkit+unsubscr...@googlegroups.com > cr...@googlegroups.com>
> > .
> > For more options, visit this group at
> >http://groups.google.com/group/google-web-toolkit?hl=en.

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to google-web-tool...@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.



Class loaded incorrectly in GwtTestCase: NoSuchMethodError

2010-04-01 Thread Hamlet D';Arcy
I am receiving a NoSuchMethodError for one of my object's
constructors. It only happens in a GWTTestCase.

The object in question is called "MyClass" in package "com.example"
The MyClass object does load, but the Class instance has no methods,
no fields, and no constructors on it.
There are other classes in that same package that load correctly.
When I run within Tomcat the class loads correctly and is usable.
When I run in GWT Hosted Mode the class loads correctly and is
usable.
When I run within the GwtTestCase the Class instance is missing all
its fields, methods, and ctors.

There is really nothing special about MyClass.

The test case just uses GWT.create() to instantiate the remote service
and then invokes a simple method on it.

This is GWT 2.0.3 on 64 bit Ubuntu linux running in IntelliJ IDEA.

Any ideas about what could be wrong?

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



notification of server side shutdown within Servlet

2010-03-29 Thread Hamlet D';Arcy
I need to be notified when the server side of my GWT application is
shutting down . Specifically, one of my RemoteServiceServlet
subclasses is initializing a resource that must be properly released
when the system shuts down (an ehcache cache to be exact).

In other frameworks I have used, I was given a method to override or
listener to implement that would call me back when the container was
shutting down my app.

Is anything like this available in GWT?
Or should I try to wire in a Tomcat shutdown listener of some sort?

Thanks in advance,

Hamlet D'Arcy

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



Re: DevMode 64-bit Linux InteliiJ IDEA

2010-02-02 Thread Hamlet D';Arcy
I did not find it possible to make 64bit Ubuntu 9.10, GWT 2.0, and 32
bit Java work together. The only solution for me was to upgrade to
Java 6. Then it worked fine.



On Jan 15, 2:16 pm, "Hamlet D'Arcy"  wrote:
> GWT Development Mode is not running for me using 64-bit Linux and
> IntellJ IDEA. I see there are some other threads and bug reports
> already for this issue, however they are either marked stale or
> predate the 2.0 release. The directions attached all include
> instructions that are no longer relevant with the 2.0 release.
>
> Does anyone have directions on how to get 64-bit Linux and GWT
> Development Mode running, preferably in IntelliJ IDEA?

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



DevMode 64-bit Linux InteliiJ IDEA

2010-01-15 Thread Hamlet D';Arcy
GWT Development Mode is not running for me using 64-bit Linux and
IntellJ IDEA. I see there are some other threads and bug reports
already for this issue, however they are either marked stale or
predate the 2.0 release. The directions attached all include
instructions that are no longer relevant with the 2.0 release.

Does anyone have directions on how to get 64-bit Linux and GWT
Development Mode running, preferably in IntelliJ IDEA?
-- 
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-tool...@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.