Zn2O / gwt-google-apis

Automatically exported from code.google.com/p/gwt-google-apis
0 stars 0 forks source link

Add new features from Gears 0.4 to the Gears library #202

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Patch from Mark Renouf 

Purpose of code changes on this branch:

Add support for the following features:

Blob
HttpRequest
Geolocation
Desktop

See issue 201 for the orignal patch and a .jar file

After the review, I'll merge this branch into:
/trunk/gears/

Original issue reported on code.google.com by galgwt.reviews@gmail.com on 28 Oct 2008 at 10:09

Attachments:

GoogleCodeExporter commented 9 years ago
Mark, I tried the patch(gears.jar from issue 201) for multiple file upload. I 
am able
to select multiple files both in hosted and non hosted mode. However when I 
press
open, I get a exception in hosted mode(as a stacktrace in eclipse). Works in
browser(compile/browse). Here is the error: 

java.lang.ClassCastException
    at java.lang.Class.cast(Class.java:2951)
    at com.google.gwt.dev.shell.JsValueGlue.get(JsValueGlue.java:128)
    at com.google.gwt.dev.shell.ie.SwtOleGlue.convertVariantsToObjects(SwtOleGlue.java:57)
    at com.google.gwt.dev.shell.ie.IDispatchImpl.callMethod(IDispatchImpl.java:119)
    at com.google.gwt.dev.shell.ie.IDispatchProxy.invoke(IDispatchProxy.java:155)
    at com.google.gwt.dev.shell.ie.IDispatchImpl.Invoke(IDispatchImpl.java:294)
    at com.google.gwt.dev.shell.ie.IDispatchImpl.method6(IDispatchImpl.java:194)
    at org.eclipse.swt.internal.ole.win32.COMObject.callback6(COMObject.java:117)
    at org.eclipse.swt.internal.win32.OS.DispatchMessageW(Native Method)
    at org.eclipse.swt.internal.win32.OS.DispatchMessage(OS.java:1925)
    at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2966)
    at com.google.gwt.dev.GWTShell.pumpEventLoop(GWTShell.java:720)
    at com.google.gwt.dev.GWTShell.run(GWTShell.java:593)
    at com.google.gwt.dev.GWTShell.main(GWTShell.java:357) 

Thanks for the efforts! 

Original comment by rake...@gmail.com on 29 Oct 2008 at 3:41

GoogleCodeExporter commented 9 years ago
Re: Comment #1

Hmm. As far as I know, none of this will work in hosted mode because
it requires Gears being installed.

Now I have some seen some interesting things happen where plugins
appear to be installed in Hosted mode. Specifically, flash...  and it
loads, but cannot properly handle javascript interaction
(ExternalInterface, etc).

Can any GWT devs shed some light on this?  Does the GWT shell use
${HOME}/.mozilla for it's profile?

Anyway the thing to remember is, always check to make sure gears is
installed first. Though, in your case it seems like it might have
returned true anyhow... ?

Original comment by mark.ren...@gmail.com on 29 Oct 2008 at 4:07

GoogleCodeExporter commented 9 years ago
Are you on windows?

"Note: Using hosted mode with the Gears project will only work on Windows as of 
the
GWT 1.5 release"

http://code.google.com/p/gwt-google-apis/wiki/GearsGettingStartedDatabase

Original comment by mark.ren...@gmail.com on 29 Oct 2008 at 4:12

GoogleCodeExporter commented 9 years ago
Set review issue status to: Accepted

Original comment by galgwt.reviews@gmail.com on 29 Oct 2008 at 8:10

GoogleCodeExporter commented 9 years ago
i am on windows. gears is installed. I can go to gears.google.com from a hosted 
mode
browser and see gears installed on the page. 

Original comment by rake...@gmail.com on 29 Oct 2008 at 9:06

GoogleCodeExporter commented 9 years ago
Set review issue status to: Started

Original comment by galgwt.reviews@gmail.com on 30 Oct 2008 at 1:24

GoogleCodeExporter commented 9 years ago
While you folks are working on the desktop integration, is it possible to make 
the
File Blob request send over to server as Multi-Part? Probably this should be 
taken
care by the Gears team but if it is something that can be taken by the 
gwt-google-api
team that will be great. Frankly I am not sure how this can be done otherwise I 
would
have contributed. 

When a file is selected by the browser, it injects periodic markers called as
multipart boundary. These markers are used by utilities like the apache file 
upload
on the server to reconstruct the file(probably in pieces, not exactly sure how 
it
works). Multipart boundary is totally missing in the Blob that we upload. 

Original comment by rake...@gmail.com on 30 Oct 2008 at 2:01

GoogleCodeExporter commented 9 years ago
While I think this issue might be better discussed on the Gears group, I wanted 
to
mention I put together a gwt-gears sample project for upload, including a 
servlet
which receives files. 

Before I send along the sample I have some questions about project layout, 
because
I'm having trouble launching the app from the project itself (works fine in the
original project, but that uses maven).

Original comment by mark.ren...@gmail.com on 30 Oct 2008 at 2:35

GoogleCodeExporter commented 9 years ago
Let's treat the sample as a separate change.  I can easily craft it into the 
same
format as the rest of the samples.  To launch it in place, we usually use the 
eclipse
project.  Once the project is build into a distribution, it creates launch 
scripts in
the distribution.

Original comment by galgwt.reviews@gmail.com on 30 Oct 2008 at 2:38

GoogleCodeExporter commented 9 years ago
It seems to work, now that you pointed how how the launch scripts should be 
used. I
works once built into the distribution. The upload sample displays a form 
similar to
a standard <form> with <input type="file"> but uses Gears and has a progress 
display bar.

It needs a servlet to receive the file so it only works when launched from the 
shell
in web mode (or possibly packaged as a .war and deployed to a server).

Where should I post it, and in what form?

(12 new files, and 1 modification to gears/samples/build.xml)

Original comment by mark.ren...@gmail.com on 31 Oct 2008 at 2:13

GoogleCodeExporter commented 9 years ago
Set review issue status to: 

Original comment by mark.ren...@gmail.com on 31 Oct 2008 at 4:45

GoogleCodeExporter commented 9 years ago
Set review issue status to: FixedNotReleased

Original comment by galgwt.reviews@gmail.com on 2 Dec 2008 at 3:26

GoogleCodeExporter commented 9 years ago
Released in gwt-gears-1.2.0

Original comment by galgwt.reviews@gmail.com on 21 Feb 2009 at 1:27