sabihi / gwt-phonegap

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

FileReader#readAs* methods should accept File instead of FileEntry #82

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What is the expected output? What do you see instead?
FileReader#readAs* methods should accept instance of File (FileObject in GWT 
PhoneGap) instead of FileEntry (according to documentation - gotFile method in 
readAsText full example)

What version of the product are you using? On what operating system?
3.3.0.0-SNAPSHOT

Please provide any additional information below.
This was working fine probably until 2.6.0 where start and end fields of a file 
became required to properly read the file.

Original issue reported on code.google.com by grz3gorz...@gmail.com on 19 Feb 2014 at 1:35

GoogleCodeExporter commented 8 years ago
Related issue in Cordova with info about start and end fields
https://issues.apache.org/jira/browse/CB-3030

Original comment by grz3gorz...@gmail.com on 19 Feb 2014 at 1:42

GoogleCodeExporter commented 8 years ago
Is this still an open issue?

Original comment by pgtabo...@gmail.com on 10 Apr 2014 at 1:39

GoogleCodeExporter commented 8 years ago
Yes, the issue is still open and valid.

FileReader interface still has:

public void readAsDataUrl(FileEntry entry);
public void readAsText(FileEntry entry);

instead of

public void readAsDataUrl(FileObject file);
public void readAsText(FileObject file);

As a work around until this is fixed I'm using helper method which is called 
only when phonegap.env=yes:

public static native void readAsText(FileReader reader, FileObject file)/*-{
    reader.readAsText(file);
}-*/;

The change in the interface will require also changes in the DevMode 
implementation of the gwt-phonegap unless it won't be supported anymore because 
of DevMode deprecation.

Original comment by grz3gorz...@gmail.com on 10 Apr 2014 at 1:58

GoogleCodeExporter commented 8 years ago
Seems to be fixed with 
https://code.google.com/p/gwt-phonegap/source/detail?r=c3788717e09e6cba918d2b727
ee7a67889e92275

Original comment by grz3gorz...@gmail.com on 3 Jun 2014 at 7:26

GoogleCodeExporter commented 8 years ago

Original comment by svkirans@gmail.com on 15 Nov 2014 at 4:59