Use nsIRDFService::GetDataSource(). For now we need to, because you can't Init() the same RDF/XML datasource twice. This kinda sucks because it's synchronous.

This commit is contained in:
waterson%netscape.com 1999-05-19 03:54:43 +00:00
parent e42fc819d2
commit 99a4f19bce

@ -40,18 +40,11 @@ function Init()
dump('adding "' + service.Value + '" to the tree\n');
try {
// create a new RDF/XML datasource
var flashservice =
Components.classes['component://netscape/rdf/datasource?name=xml-datasource'].createInstance();
// create a new RDF/XML datasource. This will,
// unfortunately, force it to be read synchronously the
// first time around.
var flashservice = RDF.GetDataSource(service.Value);
flashservice = flashservice.QueryInterface(Components.interfaces.nsIRDFXMLDataSource);
// Initialize it.
flashservice.Init(service.Value);
// Read it in asynchronously.
flashservice.Open(false);
// Add it to the tree control's composite datasource.
tree.database.AddDataSource(flashservice);