Yeah thats exactly what i did lol
store.oncomplete = function(o){
if(o.newVersion){
updateDb(screenId, o.newVersion);
}
}
I notice that it keeps firing for a little and then stops, even though
all files have been accessed already, could this be due to the fact that
\i am running it with extJS (js framework) and maybe that is doing
something in the background...
the thing is that I need to have a timing routine which will make sure
it checks for updates periodically, something like every minute or so,
can i call
checkForUpdate()
every minute, or will this cause problems? what i would do is call it
and if there is a manifest version change I would stop the timing
routine and restart once the download was done... what do you think?
Aaron Boodman wrote:
ManagedResourceStore automatically updates itself periodically. That's
what the "managed" in the name comes from. This is important so that
if the application has a bug, it can always get updated to a better
version, even if the buggy version doesn't call checkForUpdate().
Perhaps there is another way to get the notification you're looking
for? For example, if you want to know if there's a new version of the
app available, you can check to see whether the store version changed,
like this:
managedStore.oncomplete = function(details) {
if (details.newVersion) {
// if the app is reloaded now, it will get new code
}
};
If you give some more detail on what you're trying to achieve, we
might be able to give you an alternative way to go about it.
- a
On Thu, Oct 30, 2008 at 12:42 AM, webvida <[EMAIL PROTECTED]> wrote:
store.oncomplete keeps firing even after the manifest is downloaded,
why is this? I thought this event was triggered on a successful
download and then would stop...
I use this event to initiate an ajax call to update the clientside sql
lite db - this involves a lot of data and i don't want it downloading
it mulitple times.
store.checkForUpdate(); should just check when I want it to... I can
create my own timing sequence for this and I can't understand why
gears needs too.
is there a way that I can stop this timing sequence of
store.checkForUpdate(); ?
Thanks