[Project_owners] Easiest way to save/restore <tree/> state?

Eric H. Jung grimholtz at yahoo.com
Wed Feb 8 20:42:57 EST 2006


Thanks HJ and Neil for the replies. This has been very helpful. I will
implement it myself then, with an observer.

Any idea why I'd get an NS_NOINTERFACE exception with:

var treeBuilder = 
  tree.builder.QueryInterface(Components.interfaces.nsIXULTreeBuilder);

The line before it calls tree.builder.rebuild() -- and works -- so I'm
fairly certain tree.builder is valid...


--- Neil <neil at parkwaycc.co.uk> wrote:

> HJ wrote:
> 
> > Eric H. Jung wrote:
> >
> >> I have a number of template-driven, RDF-based <tree/> elements.
> They 
> >> do not specify 'dont-build-content'.
> >
> > the trees I use keep track of this without a single additional line
> of 
> > code
> 
> Only chrome RDF trees with flags="dont-build-content" may use a state
> 
> datasource. For static content trees you can of course use 
> persist="open" but that fails for template-driven content trees. But 
> perhaps you can use the builder observer to write suitable assertions
> to 
> localstore and composite it with your regular datasource so that the 
> assertions show up as open attributes.
> _______________________________________________
> Project_owners mailing list
> Project_owners at mozdev.org
> http://mozdev.org/mailman/listinfo/project_owners
> 



More information about the Project_owners mailing list