<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet type="text/xsl" media="screen" href="/App_Themes/default/rss.xslt"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:media="http://search.yahoo.com/mrss/" xmlns:evnet="http://www.mscommunities.com/rssmodule/"><channel><title>Entries for bwill</title><atom:link rel="self" type="application/rss+xml" href="http://channel9.msdn.com/niners/bwill/rss/default.aspx" /><image><url>http://mschnlnine.vo.llnwd.net/d1/Dev/App_Themes/C9/images/feedimage.png</url><title>Entries for bwill</title><link>http://channel9.msdn.com/Niners/bwill/</link></image><description>Entries, comments and threads posted by bwill</description><link>http://channel9.msdn.com/Niners/bwill/</link><language>en-us</language><pubDate>Fri, 22 Sep 2006 02:43:09 GMT</pubDate><lastBuildDate>Fri, 22 Sep 2006 02:43:09 GMT</lastBuildDate><generator>EvNet (EvNet, Version=1.0.3608.3122, Culture=neutral, PublicKeyToken=null)</generator><item><title>Vista Sidebar Gadgets: persistent settings [Vista Sidebar Gadgets: persistent settings]</title><description>&lt;P&gt;Here is a&amp;nbsp;question that seems to pop up with some regularity on the sidebar newsgroup: "Why doesn't the weather gadget remember where I live, if I close it and then add it again to my sidebar?"&lt;/P&gt;
&lt;P&gt;The answer is that every time you add the weather gadget to the sidebar, you are creating a new 'instance' of the gadget; and every instance has its own associated location.&amp;nbsp; So the newly-added weather gadget has settings that are completely distinct from the settings on the one you closed.&amp;nbsp; This makes sense when you start to think about having three or five weather gadgets running at the same time - they should each be able to show the weather at a different location.&lt;/P&gt;
&lt;P&gt;Having said that, you may choose to make a different design choice in your gadgets.&amp;nbsp; Unfortunately, the sidebar does not offer a built-in mechanism for sharing settings between gadget instances.&amp;nbsp; When asked how to do this by other gadget developers, my first response was: "you can use a shared file to share settings between gadget instances."&lt;/P&gt;
&lt;P&gt;To make life easier for everyone, I decided to write a javascript library that encapsulated that work, and exposed a simple API for reading and writing shared settings.&amp;nbsp; In the process of writing the library, I discovered that just saying "use a shared file" vastly oversimplifies the effort involved.&amp;nbsp; *grin*&lt;/P&gt;
&lt;P&gt;Here is the result of my efforts; the attached ZIP file contains a code file persistentSettings.js, and a README.TXT that describes the API.&lt;/P&gt;&lt;p&gt;in reply to &lt;a href='http://channel9.msdn.com/playground/Sandbox/231595/'&gt;Vista Sidebar Gadgets: persistent settings&lt;/a&gt;&lt;/p&gt;&lt;img src="http://channel9.msdn.com/231595/WebViewBug.aspx?EVT=0" height="1" width="1" alt="" /&gt;</description><comments>http://channel9.msdn.com/playground/Sandbox/231595/</comments><link>http://channel9.msdn.com/playground/Sandbox/231595/</link><pubDate>Fri, 22 Sep 2006 02:43:09 GMT</pubDate><guid isPermaLink="false">http://channel9.msdn.com/playground/Sandbox/231595/</guid><evnet:views>6881</evnet:views><evnet:viewtrackingurl>http://channel9.msdn.com/231595/WebViewBug.aspx?EVT=0</evnet:viewtrackingurl><evnet:previewtext>Here is a&amp;nbsp;question that seems to pop up with some regularity on the sidebar newsgroup: "Why doesn't the weather gadget remember where I live, if I close it and then add it again to my sidebar?"
The answer is that every time you add the weather gadget to the sidebar, you are creating a new&amp;#8230;</evnet:previewtext><media:group><media:content url="http://mschnlnine.vo.llnwd.net/d1/ch9/5/9/5/1/3/2/236914_persistentSettings.zip" expression="full" type="video/x-ms-wmv" medium="video" /><media:content url="http://mschnlnine.vo.llnwd.net/d1/ch9/5/9/5/1/3/2/236914.jpg" expression="full" type="image/jpeg" medium="image" /></media:group><dc:creator>bwill</dc:creator><slash:comments>0</slash:comments><wfw:commentRss>http://channel9.msdn.com/playground/Sandbox/231595/RSS/</wfw:commentRss><trackback:ping>http://channel9.msdn.com/231595/Trackback.aspx</trackback:ping></item></channel></rss>