incubator-callback-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Anis KADRI <anis.ka...@gmail.com>
Subject [CordovaJS] File API: DirectoryEntry and exec
Date Mon, 21 May 2012 23:02:45 GMT
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

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message