blackberry/WebWorks-TabletOS — Issue #49: TypeError: error on xhr requests when registering callback param
Author: cdelcol
Created: 2012-01-28 20:44:02+00:00
State: open

These errors seem to happen with any WebWorks call that registers a callback parameter. For example, the following code works as expected:

blackberry.app.event.onSwipeDown(function() {
alert("swipe down");
});

But produces an error like the following:

index.html:190 XHR finished loading: "webworks://blackberry/app/event/onSwipeDown?onClick=0".
index.html:185 TypeError: 'null' is not an object (evaluating 'response.Response')

The behaviour is the same with the following functions:

blackberry.app.event.onForeground(cb);
XHR finished loading: "webworks://blackberry/app/event/onForeground?onClick=2".
index.html:185 TypeError: 'null' is not an object (evaluating 'response.Response')

blackberry.app.event.onBackground(cb);
index.html:190 XHR finished loading: "webworks://blackberry/app/event/onBackground?onClick=1".
index.html:185 TypeError: 'null' is not an object (evaluating 'response.Response')

Besides the errors in the log messages, we don't see any problems with functionality.