Hello,
I didn't think about this. But yes my 'store' is in the global scope.
I tried with the 'files' in the global scope too without any success.
in this way, i tried to declare the callback function separately like
this:
////////////////////////////////////////
function capture(){
store.capture(files, callbackCapture)
}
function callbackCapture(url, success, captureId){
console.log('captured: ' + url + ' ----success: ' + success +
'----captureId: ' + captureId);
}
//////////////////////////////////////
but it didn't work either.
An other thing, in my function when i capture I declare the store like
this:
function capture(){
try {
localServer = google.gears.factory.create('beta.localserver');
localServer.removeStore(STORE_NAME);
store = localServer.createStore(STORE_NAME);
}
catch (ex) {
console.log('Could not remove local server: ' + ex.message);
}
store.capture(files, callbackCapture)
}
Maybe the 'remove' and 'createStore' are not yet finished when the
capture begins...
So I tried to separate these 3 actions, using 3 buttons: one to say
"remove", an other one to say "create" and the last one to capture.
With this technique, I can't reproduce the problem ( for few tests i
did), it seems to wok well.
Any Idea?
Loic
On 6 mai, 19:13, Michael Nordman <
micha...@google.com> wrote:
> I think if the 'store' is garbage collected prior to capture
> completion, pending captures are dropped. Is there an reference to the
> 'store' in the global scope? And if not, does adding one make a
> difference?
>