This is a migrated thread and some comments may be shown as answers.

Chanining async functions

1 Answer 32 Views
HTML5, CSS, JavaScript
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Chris
Top achievements
Rank 1
Chris asked on 08 Apr 2013, 08:00 PM
Hi I struggling to make Icenium's async calls a little more manageable. Ideally I'd like to use something like promises in Jquery but I don't think it supports them. Currently I have

    window.requestFileSystem(LocalFileSystem.PERSISTENT, 0,onFSWin  , onFSFail);

which calls   

function onFSWin(fileSystem) {
        fileSystem.root.getDirectory("Icenium Demo", {create: false, exclusive: false}, onGetDirectoryWin, onGetDirectoryFail);
    }
As you can imagine 4-5 async calls chained together becomes quite messy. Can anyone recommend a way of dealing with this

1 Answer, 1 is accepted

Sort by
0
Jordan
Telerik team
answered on 10 Apr 2013, 04:52 PM
Hello Chris,

I'm not aware of async wrapper over Cordova file API.

But as it closely resembles WC3 File API you may be able to adapt this github library or the idea behind in your own wrapper.

Greetings,
Jordan
the Telerik team

Share feedback and vote for features on our Feedback Portal.
Want some Kendo UI online training - head over to Kendo UI Dojo.
Tags
HTML5, CSS, JavaScript
Asked by
Chris
Top achievements
Rank 1
Answers by
Jordan
Telerik team
Share this question
or