rem: sb_datasource.Init(registry, RDF.GetResource(sidebar_resource)); 
add: sb_datasource.Init(registry, RDF.GetResource(sidebar.resource)); 
context: function Init(sidebardb, sidebar_resource){  // Initialize the Sidebar  // Install all the datasources named in the Flash Registry into  // the tree control. Datasources are listed as members of the  // NC:FlashDataSources sequence, and are loaded in the order that  // they appear in that sequence.  var registry;  try {    // First try to construct a new one and load it    // synchronously. nsIRDFService::GetDataSource() loads RDF/XML    // asynchronously by default.    registry = Components.classes['component://netscape/rdf/datasource?name=xml-datasource'].createInstance();    registry = registry.QueryInterface(Components.interfaces.nsIRDFDataSource);    var remote = registry.QueryInterface(Components.interfaces.nsIRDFRemoteDataSource);    remote.Init(sidebardb); // this will throw if it's already been opened and registered.    // read it in synchronously.    remote.Refresh(true);  }  catch (ex) {    // if we get here, then the RDF/XML has been opened and read    // once. We just need to grab the datasource.    registry = RDF.GetDataSource(sidebardb);  }  // Create a 'container' wrapper around the sidebar_resources  // resource so we can use some utility routines that make access a  // bit easier.  var sb_datasource = Components.classes['component://netscape/rdf/container'].createInstance();  sb_datasource = sb_datasource.QueryInterface(Components.interfaces.nsIRDFContainer);  sb_datasource.Init(registry, RDF.GetResource(sidebar_resource));    var sidebox = document.getElementById('sidebox');  // Now enumerate all of the flash datasources.  var enumerator = sb_datasource.GetElements();  while (enumerator.HasMoreElements()) {    var service = enumerator.GetNext();    service = service.QueryInterface(Components.interfaces.nsIRDFResource);    var new_panel = createPanel(registry, service);    if (new_panel) {      sidebox.appendChild(new_panel);    }  }}
meta: 9421	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/9421/8bd50d24fe2dcc50ba0be715285d876567035073/sidebar.js/clean/rdf/resources/sidebar.js