Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > Applications > Why doesn't Weather Widget update unless you go to Dashboard?

Why doesn't Weather Widget update unless you go to Dashboard?
Thread Tools
Dedicated MacNNer
Join Date: Apr 2003
Location: Detroit, MI
Status: Offline
Reply With Quote
May 10, 2005, 09:03 PM
 
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
Reply With Quote
May 10, 2005, 10:52 PM
 
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
Reply With Quote
May 10, 2005, 11:26 PM
 
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
Reply With Quote
May 10, 2005, 11:47 PM
 
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
Reply With Quote
May 11, 2005, 06:24 PM
 
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
     
   
Thread Tools
Forum Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Top
Privacy Policy
All times are GMT -5. The time now is 02:43 PM.
All contents of these forums © 1995-2011 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.7 © 2000-2011, Jelsoft Enterprises Ltd., Content Relevant URLs by vBSEO 3.3.2