You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cordova.apache.org by "Bernhard Bezdek (JIRA)" <ji...@apache.org> on 2012/08/13 14:38:38 UTC

[jira] [Created] (CB-1228) Read File never executes callback onloadend in iOS 6

Bernhard Bezdek created CB-1228:
-----------------------------------

             Summary: Read File never executes callback onloadend in iOS 6
                 Key: CB-1228
                 URL: https://issues.apache.org/jira/browse/CB-1228
             Project: Apache Cordova
          Issue Type: Bug
          Components: iOS
    Affects Versions: 2.0.0, 1.7.0
         Environment: iOS 6 Simulator and installed on a device wit the iOS6 Beta installed on
            Reporter: Bernhard Bezdek
            Assignee: Shazron Abdullah


File APi from Website doesen't work on iOS6 if I want to Read a file (text).
This is my modified Version which is working fine on iOS lower Version 6
function getFile(sFileName, oCallback) {

window.requestFileSystem(LocalFileSystem.PERSISTENT, 0, function(fileSystem) {
		fileSystem.root.getFile(sFileName, {
			create : true
		}, function(fileEntry) {
			fileEntry.file(function(file) {
				var reader = new FileReader();

				reader.onloadend = function(evt) {
					alert('READ FILE')
					window[oCallback](evt.target.result, sFileName);
				};
				
				reader.readAsText(file); // callback never executed
				
			}, function(error) {
				alert('Error C')
			});
		}, function() {
			alert('Error B')
		});
	}, function(error) {
		alert('Error A')
	});
}


--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Closed] (CB-1228) Read File never executes callback onloadend in iOS 6

Posted by "Andrew Grieve (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CB-1228?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Andrew Grieve closed CB-1228.
-----------------------------

    Resolution: Duplicate
    
> Read File never executes callback onloadend in iOS 6
> ----------------------------------------------------
>
>                 Key: CB-1228
>                 URL: https://issues.apache.org/jira/browse/CB-1228
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: iOS
>    Affects Versions: 1.7.0, 2.0.0
>         Environment: iOS 6 Simulator and installed on a device wit the iOS6 Beta installed on
>            Reporter: Bernhard Bezdek
>            Assignee: Shazron Abdullah
>              Labels: javascript
>
> File APi from Website doesen't work on iOS6 if I want to Read a file (text).
> This is my modified Version which is working fine on iOS lower Version 6
> function getFile(sFileName, oCallback) {
> window.requestFileSystem(LocalFileSystem.PERSISTENT, 0, function(fileSystem) {
> 		fileSystem.root.getFile(sFileName, {
> 			create : true
> 		}, function(fileEntry) {
> 			fileEntry.file(function(file) {
> 				var reader = new FileReader();
> 				reader.onloadend = function(evt) {
> 					alert('READ FILE')
> 					window[oCallback](evt.target.result, sFileName);
> 				};
> 				
> 				reader.readAsText(file); // callback never executed
> 				
> 			}, function(error) {
> 				alert('Error C')
> 			});
> 		}, function() {
> 			alert('Error B')
> 		});
> 	}, function(error) {
> 		alert('Error A')
> 	});
> }

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (CB-1228) Read File never executes callback onloadend in iOS 6

Posted by "Michal Mocny (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CB-1228?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13433148#comment-13433148 ] 

Michal Mocny commented on CB-1228:
----------------------------------

Duplicate of https://issues.apache.org/jira/browse/CB-1219 which I am going to take a look at.
                
> Read File never executes callback onloadend in iOS 6
> ----------------------------------------------------
>
>                 Key: CB-1228
>                 URL: https://issues.apache.org/jira/browse/CB-1228
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: iOS
>    Affects Versions: 1.7.0, 2.0.0
>         Environment: iOS 6 Simulator and installed on a device wit the iOS6 Beta installed on
>            Reporter: Bernhard Bezdek
>            Assignee: Shazron Abdullah
>              Labels: javascript
>
> File APi from Website doesen't work on iOS6 if I want to Read a file (text).
> This is my modified Version which is working fine on iOS lower Version 6
> function getFile(sFileName, oCallback) {
> window.requestFileSystem(LocalFileSystem.PERSISTENT, 0, function(fileSystem) {
> 		fileSystem.root.getFile(sFileName, {
> 			create : true
> 		}, function(fileEntry) {
> 			fileEntry.file(function(file) {
> 				var reader = new FileReader();
> 				reader.onloadend = function(evt) {
> 					alert('READ FILE')
> 					window[oCallback](evt.target.result, sFileName);
> 				};
> 				
> 				reader.readAsText(file); // callback never executed
> 				
> 			}, function(error) {
> 				alert('Error C')
> 			});
> 		}, function() {
> 			alert('Error B')
> 		});
> 	}, function(error) {
> 		alert('Error A')
> 	});
> }

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira