Talk:Sample Banner Widget

From Chumby Wiki
Revision as of 19:46, 19 February 2007 by Raff (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

A few notes on configuring a widget that may explain the process a little better:

  • for each Chumby widget there can be an associated configuration widget
  • the configuration widget is a Flash movie (but it could, in theory, just be an Ajax app)
  • the configuration widget doesn't have to be a FlashLite movie (or limited to Flash 7) as long as the user has the right Flash plugin installed
  • the configuration widget receives a "pointer" to a widget profile (configuration file) for each user using the Chumby widget
  • the widget profile is an XML file that can be read and rewritten by the configuration widget
  • the basic format of the widget profile is the following:
 <widget_instance id="...">
   <widget_parameters>
     <widget_parameter>
       <name>parameter name</name>
       <value>parameter value</name>
     </widget_parameter>     
   </widget_parameters>
 <widget_instance>
  • the configuration widget should "read" the widget profile from the configuration url at _root._chumby_instance_url, parse the returned XML, accept some user input for the configuration parameters, rewrite the XML file and post back to the configuration URL.
  • note that it's ok to create a new XML file that only contains the configuration parameters (without the extra XML)
  • also note that after POSTing the new XML configuration the server returns a copy of the "old" configuration (so you cannot use the returned values to populate the configuration dialog with the new configuration)
  • as noted before the configuration widget does not have to be a FlashLite/Flash 6/Flash 7 application since it runs on the user computer. With the new facilities of Flash 9/Flex (e4x) it's much easier to write configuration widgets using the new techniques. Creating configuration widgets using OpenLazlo it's probably also easier than creating them in the standard Flash authoring tool.