Re: Stillborn dragstart event

2013-03-03 Thread Adam Augusta
I should add that this only happens in dev mode. The compiled JS works fine.

On Sun, Mar 3, 2013 at 4:10 PM, Adam Augusta  wrote:
> The ClientWebApp sample application in GWT 2.5 contains example
> drag-and-drop code, as seen below.
> When I use it, it works great the first time I drag a TaskTemplate. On
> subsequent drags, event.getDataTransfer() fails because
> event.dead=true. Halp?
>
> public class DesktopTaskEditView extends Composite implements TaskEditView {
> //...
>   static class TaskTemplateCell extends AbstractCell {
> //...
> public TaskTemplateCell() {
>   // Register the kinds of event this cell will manage.
>   super("dragstart");
> }
> //...
> /**
>  * Handles "drag-start" events inside the element named "root".
> */
> @UiHandler({"root"})
> void onDragStart(DragStartEvent event, Element parent, Context context) {
>   // Save the ID of the TaskProxy.
>   DataTransfer dataTransfer = event.getDataTransfer();
>   dataTransfer.setData("text", String.valueOf(context.getIndex()));
>
>   // Set the image.
>   dataTransfer.setDragImage(parent, 25, 15);
> }
>   }
> //...
> }

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




Stillborn dragstart event

2013-03-03 Thread Adam Augusta
The ClientWebApp sample application in GWT 2.5 contains example
drag-and-drop code, as seen below.
When I use it, it works great the first time I drag a TaskTemplate. On
subsequent drags, event.getDataTransfer() fails because
event.dead=true. Halp?

public class DesktopTaskEditView extends Composite implements TaskEditView {
//...
  static class TaskTemplateCell extends AbstractCell {
//...
public TaskTemplateCell() {
  // Register the kinds of event this cell will manage.
  super("dragstart");
}
//...
/**
 * Handles "drag-start" events inside the element named "root".
*/
@UiHandler({"root"})
void onDragStart(DragStartEvent event, Element parent, Context context) {
  // Save the ID of the TaskProxy.
  DataTransfer dataTransfer = event.getDataTransfer();
  dataTransfer.setData("text", String.valueOf(context.getIndex()));

  // Set the image.
  dataTransfer.setDragImage(parent, 25, 15);
}
  }
//...
}

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




Problem with DynaTableRf Sample with Maven

2013-02-26 Thread Adam Augusta
I get an error when I try to run the DynaTableRf sample application
with maven.  Can anyone enlighten me?

Sample app from GWT 2.5.0 release.
Maven 2.2.1

There are four CG errors (one for each domain object?), then I get a
"The RequestFactory ValidationTool..." error.

Adams-MacBook-Pro:DynaTableRf roxton$ mvn gwt:run
[INFO] Scanning for projects...
[INFO] 
[INFO] Building com.google.gwt.sample.dynatablerf.DynaTableRf
[INFO]task-segment: [gwt:run]
[INFO] 
[INFO] Preparing gwt:run

[INFO] [gwt:run {execution: default-cli}]
[INFO] create exploded Jetty webapp in
/Users/roxton/dev/gwt-2.5.0/samples/DynaTableRf/target/DynaTableRf-1.0-SNAPSHOT
[ERROR] Feb 26 15:55:03 Adams-MacBook-Pro.local java[7139] :
CGContextGetCTM: invalid context 0x0
[ERROR] Feb 26 15:55:03 Adams-MacBook-Pro.local java[7139] :
CGContextSetBaseCTM: invalid context 0x0
[ERROR] Feb 26 15:55:03 Adams-MacBook-Pro.local java[7139] :
CGContextGetCTM: invalid context 0x0
[ERROR] Feb 26 15:55:03 Adams-MacBook-Pro.local java[7139] :
CGContextSetBaseCTM: invalid context 0x0
[INFO] Hibernate Validator 4.1.0.Final
[ERROR] Feb 26, 2013 3:55:22 PM
com.google.web.bindery.requestfactory.server.RequestFactoryServlet
doPost
[ERROR] SEVERE: Unexpected error
[ERROR] java.lang.RuntimeException: The RequestFactory ValidationTool
must be run for the
com.google.gwt.sample.dynatablerf.shared.DynaTableRequestFactory
RequestFactory type
[ERROR] at 
com.google.web.bindery.requestfactory.vm.impl.Deobfuscator$Builder.load(Deobfuscator.java:57)

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




Re: Problem with DynaTableRf Sample with Maven

2013-02-26 Thread Adam Augusta
I ended up fixing this by adding the following two plug-in configurations.

So, was this a bug, or was my annotation-processor discovery not
working right for some environmental reason? I don't want to violate
best practices, especially on a new codebase. Let me know if you have
any tips or suggestions.

  
org.bsc.maven
maven-processor-plugin
2.0.5

  
process

  process

generate-sources
  


  
com.google.web.bindery
requestfactory-apt
${gwtVersion}
  

  
  
org.codehaus.mojo
build-helper-maven-plugin
1.7

  
add-source
generate-sources

  add-source


  

${project.build.directory}/generated-sources/apt
  

  

  


On Tue, Feb 26, 2013 at 4:12 PM, Adam Augusta  wrote:
> I get an error when I try to run the DynaTableRf sample application
> with maven.  Can anyone enlighten me?
>
> Sample app from GWT 2.5.0 release.
> Maven 2.2.1
>
> There are four CG errors (one for each domain object?), then I get a
> "The RequestFactory ValidationTool..." error.
>
> Adams-MacBook-Pro:DynaTableRf roxton$ mvn gwt:run
> [INFO] Scanning for projects...
> [INFO] 
> 
> [INFO] Building com.google.gwt.sample.dynatablerf.DynaTableRf
> [INFO]task-segment: [gwt:run]
> [INFO] 
> 
> [INFO] Preparing gwt:run
> 
> [INFO] [gwt:run {execution: default-cli}]
> [INFO] create exploded Jetty webapp in
> /Users/roxton/dev/gwt-2.5.0/samples/DynaTableRf/target/DynaTableRf-1.0-SNAPSHOT
> [ERROR] Feb 26 15:55:03 Adams-MacBook-Pro.local java[7139] :
> CGContextGetCTM: invalid context 0x0
> [ERROR] Feb 26 15:55:03 Adams-MacBook-Pro.local java[7139] :
> CGContextSetBaseCTM: invalid context 0x0
> [ERROR] Feb 26 15:55:03 Adams-MacBook-Pro.local java[7139] :
> CGContextGetCTM: invalid context 0x0
> [ERROR] Feb 26 15:55:03 Adams-MacBook-Pro.local java[7139] :
> CGContextSetBaseCTM: invalid context 0x0
> [INFO] Hibernate Validator 4.1.0.Final
> [ERROR] Feb 26, 2013 3:55:22 PM
> com.google.web.bindery.requestfactory.server.RequestFactoryServlet
> doPost
> [ERROR] SEVERE: Unexpected error
> [ERROR] java.lang.RuntimeException: The RequestFactory ValidationTool
> must be run for the
> com.google.gwt.sample.dynatablerf.shared.DynaTableRequestFactory
> RequestFactory type
> [ERROR] at 
> com.google.web.bindery.requestfactory.vm.impl.Deobfuscator$Builder.load(Deobfuscator.java:57)

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