cordova-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sergey Grebnov (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (CB-2212) FileSystem getFile() call never finds file on WP8 as isolated storage is empty
Date Wed, 16 Jan 2013 18:52:12 GMT

    [ https://issues.apache.org/jira/browse/CB-2212?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13555334#comment-13555334
] 

Sergey Grebnov commented on CB-2212:
------------------------------------

Hi Michael, you may try to access the file using XmlHttpRequest

    var xhr = new XMLHttpRequest();

    xhr.open('GET', 'readme.txt', false);
    xhr.onreadystatechange = function () {
        if (xhr.readyState == 4) {
            if (xhr.status == 200) {
                console.log(xhr.responseText);                    
            }
        }
    }

    xhr.send(null);
                
> FileSystem getFile() call never finds file on WP8 as isolated storage is empty
> ------------------------------------------------------------------------------
>
>                 Key: CB-2212
>                 URL: https://issues.apache.org/jira/browse/CB-2212
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: WP8
>    Affects Versions: 2.3.0
>            Reporter: Michael Fry
>            Assignee: Jesse MacFadyen
>
> In attempting read a file included in my www folder I was continually returned an error
code of 0.  In digging in it appears it was due to file not found.
> In the GapBrowser_Loaded handler there is a large chunk of commented out code that notes
that in WP8 "isolated storage is no more required in WP8". It appears that this suppresses
the loading of isolated storage because when I view my emulator using WP power tools it is
empty.
> The file i/o code in File.cs reads/writes using isolated storage.  Without the www files
being loaded at startup it will never be able to make the reads from things like settings
or readme files.
> After uncommenting the code and creating a CordovaSourceDictionary.xml file I was able
to load isolated storage. File reads then worked as designed.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Mime
View raw message