Hi all,

I am trying to implement the File API for bada 2.0 however I have been
running into this problem and I haven't been able to solve it.

Whenever I run exec for any method of DirectoryEntry I get the following
error:

TypeError: '[object Object]' is not a function (evaluating 'exec(win, fail,
"File", "getFile", [this.fullPath, path, options])')

The reason is that exec is for some reason equal to the empty object {}.

I believe the build method is not working properly and is leaving
module.exports to {} in this case.

If I redefine exec like so:

var exec = require('cordova/exec');

Right before I call it in any of the DirectoryEntry methods then it works
fine!

Does anyone know what might be going on ?

The weird thing is that this TypeError only happens for DirectoryEntry and
not for any other modules. I use exec everywhere else just fine.

Any help really appreciated! I wasted way too much time on this...

Thanks

Anis

Reply via email to