Hi

Managed to narrow it down:

It seems that createWorkerFromUrl does not work in Google Chrome - at
least my Google Chrome anyhow.  Sample code below:

var _wp = google.gears.factory.create('beta.workerpool');
_wp.onmessage = function(a, b, msg) {
  alert('Received message: ' + msg.body);
}
var _child = _wp.createWorkerFromUrl('worker.js');
// var _child = _wp.createWorker("var _wp = google.gears.workerPool;
_wp.onmessage = function(a, b, msg) { _wp.sendMessage('Got message: '
+ msg.body, msg.sender); }");
_wp.sendMessage('test', _child);

createWorker works fine.

Cheers

Chris

On Nov 18, 9:18 am, Khookie <[EMAIL PROTECTED]> wrote:
> Hi
>
> Just wondering anyone has had big difficulties with debugging Gears
> applications in Chrome?  Especially ones with workerpools.
>
> I keep getting the below error in the Javascript Console on the line
> which creates the worker (i.e. wp.createWorkerFromUrl).
>
> Uncaught TypeError: Property 'onerror' of object [object global] is
> not a function
>
> and the funny thing was... I commented all the code in the worker file
> out and it still came up with that error message.  The code works fine
> in both IE & Firefox.
>
> Chris

Reply via email to