 |
 |
Why doesn't Weather Widget update unless you go to Dashboard?
|
 |
|
 |
|
Dedicated MacNNer
Join Date: Apr 2003
Location: Detroit, MI
Status:
Offline
|
|
when I go to Dashboard, only then does the weather widget update. Any way to force it to update when it's in the background? Or was this intentional to save its CPU usage? Thanks.
|
|
|
| |
|
|
|
 |
|
 |
|
Grizzled Veteran
Join Date: Apr 2004
Location: Nagoya, Japan • 日本 名古屋市
Status:
Offline
|
|
It's intentional, to save CPU usage. All widgets are supposed to pause when the Dashboard is hidden.
|
|
|
| |
|
|
|
 |
|
 |
|
Professional Poster
Join Date: Oct 1999
Location: :ИOITAↃO⅃
Status:
Offline
|
|
You can change it if you want, though.
Just do this:
1. Option-drag the Weather.wdgt out of /Library/Widgets and into ~/Library/Widgets to make a personal copy.
2. Ctrl-click and `show package contents'
3. Open Weather.js in your favorite text editor. Search for the following lines (lines 1300-1305):
Code:
function onhide () {
if (timer != null) {
// we were hidden clear the timer
clearInterval(timer);
timer = null;
}
and replace them with:
Code:
function onhide () {
if (timer != null) {
// we were hidden clear the timer
// clearInterval(timer);
// timer = null;
// when hidden, update only 1/15th as often (i.e. 30 minutes)
timer = setInterval ('fetchData();', timerInterval * 15 );
}
I think that should work.
|
|
|
| |
|
|
|
 |
|
 |
|
Dedicated MacNNer
Join Date: Apr 2003
Location: Detroit, MI
Status:
Offline
|
|
I followed the directions. Hopefully, this will work.  Thanks for the tip! People here are the most helpful.
|
|
|
| |
|
|
|
 |
|
 |
|
Dedicated MacNNer
Join Date: Apr 2003
Location: Detroit, MI
Status:
Offline
|
|
How do I change the update frequency in the above code? With the code above it seems to be updating every 15 seconds or so. Each weather widget hence is shooting up to 9% CPU use when doing that.
I just want it to update every 30 min
|
|
|
| |
|
|
|
 |
 |
|
 |
|
|
|
|
|

|
|
 |
Forum Rules
|
 |
 |
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
|
HTML code is Off
|
|
|
|
|
|
 |
 |
 |
 |
|
 |