title: Multiple Dashboard widget instances don't survive widget update. Any way to prevent this?
body: <p>I've written a Mac OS X Dashboard to show the StackOverflow flair of yourself and other people.</p>
  
  <p>My problem is that whenever I update that widget to a new version, all previous instances are removed and a single new instance is created on the Dashboard. So if you previously followed the flair of 4 people you'll have to recreate the widgets and enter their user-IDs again. :(</p>
  
  <p>Is there any way to keep all running instances while updating a widget?</p>
  
  <p>Checking the preferences file, I see that a new instance is created after a new version of the widget is deployed. Is this by design? Does <strong>all</strong> widgets work like this, by any chance?? If so, can this be manually circumvented somehow?</p>
  
  <p>You can find the widget in question, including the project files, at <a href="http://widget.huxhorn.de" rel="nofollow noreferrer">http://widget.huxhorn.de</a></p>
  
  <p>I've changed the code in remove() to <strong>set</strong> the preferences to the correct values instead of <em>null</em> as suggested below - but this doesn't help, either.<br>
  What's my mistake?? Help! I'm stuck!</p>
  
  <hr>
  
  <p>The other problem of my widget has been fixed:<br>
  I accidentally called</p>
  
  <pre><code>widget.preferenceForKey(null, dashcode.createInstancePreferenceKey(userIdPrefKey));
  </code></pre>
  
  <p>instead of </p>
  
  <pre><code>widget.preferenceForKey(dashcode.createInstancePreferenceKey(userIdPrefKey));
  </code></pre>
  
  <p>but this is now fixed (not yet released).</p>