I've created a Vista sidebar widget that uses jQuery to fetch XML and display some basic details of the XML response in the main HTML of the gadget (a date for an event). However, I'm having a devil of a time getting the flyout page to work correctly (or at all) to display the details once the user clicks on a link.
Since I'm passing the XML response to the flyout, I'm using a single .js file for the whole app. I can't use the $('document').ready() function because it applies itself to the flyout and the flyout doesn't show up at all. So I've created two init functions:
mainInit, which handles the same duty as .ready() on the main app, and flyInit, which handles the .ready() for the flyout.
With just the mainInit in place, the app works fine, adding event handlers for the main app document and authentication. When I click a link for the details, however, no matter what is in the flyInit function, the flyout simply doesn't appear.
I'm trying to understand the basic structure of a Vista Sidebar app - would a global variable registered in one .js file be available to all HTML pages in the gadget? I've tried handling the flyout by manipulating System.Gadget.Flyout.document, either with jQuery or with plain ol' js, to no effect.
Books are pretty thin on the ground for gadgets, and MSDN is useless. I've taken apart other apps and followed tutorials, but it doesn't seem to work for me.
Also: I have a weird issue where, since I've reinstalled the gadget so many times to test it, that Vista is using a background image from a prior iteration for the current one. I've scrubbed everything about my gadget from the settings.ini file - but do I need to go into the registry and clean it out too? I'm thinking maybe this built-up crap is what's making things not work right.
This is a very long question, and I apologize. I'm frustrated beyond belief with this, and if it wasn't a paying gig, I'd drop it like a hot rock.