开发者

JS: I'm not getting the scope

I'm trying to modify CouchDB's JS API to work asynchronous, but there is an error I cannot solve:

Please find my JS API find at pastebin. If I call (new CouchDB("dbname")).allDocs(function(result) {console.log(result)}) (line 193) I get an error because the okCallback function is not defined in the callback开发者_如何学Go function.

I don't know why; it should be defined in this scope..

Any hints are very welcome!

Cheers, Manuel


designDocs takes okCallback as a parameter. You are not passing a parameter when you call the function. Hence, the value is undefined.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜