I have found that using "persist" on templatized content prevent from
restoring values for the persistent attributs.
ex:
In templatized treecol :
<xul:treecol uri="rdf:*"
label="rdf:http://daim.project.org/daim-rdf#label"
hidden="rdf:http://daim.project.org/daim-rdf#hidden"
persist="width,hidden,ordinal"
flex="1"/>
the hidden attribute will be stored as :
<RDF:Description RDF:about="chrome://app/content/my/window.xul">
<NC:persist
RDF:resource="chrome://app/content/my/window.xul#uri_of_the_rdf_resource"/>
....
</RDF:Description>
<RDF:Description
RDF:about="chrome://app/content/my/window.xul#http://daim.project.org/granulo#perimeter"
hidden="false" />
But in this case, the persistent attribute will no be restored, because
it is searched as uri_of_the_rdf_resource. The proof is that if I change
the above to (and the corresponding resource) in localstore.rdf to :
<RDF:Description RDF:about="chrome://app/content/my/window.xul">
<NC:persist RDF:resource="uri_of_the_rdf_resource"/>
....
</RDF:Description>
<RDF:Description RDF:about="http://daim.project.org/granulo#perimeter"
hidden="false" />
Then, the persistent attribute will be restored.
I suspect that this is simply because the builder will look after the
name of the ressource in the uri for persistent data name and not for
the resource name as stored in localstore.
David
I have found that using "persist" on templatized content prevent from
restoring values for the persistent attributs.
ex:
In templatized treecol :
<xul:treecol uri="rdf:*"
label="rdf:http://daim.project.org/daim-rdf#label"
hidden="rdf:http://daim.project.org/daim-rdf#hidden"
persist="width,hidden,ordinal"
flex="1"/>
the hidden attribute will be stored as :
<RDF:Description RDF:about="chrome://app/content/my/window.xul">
<NC:persist
RDF:resource="chrome://app/content/my/window.xul#uri_of_the_rdf_resource"/>
....
</RDF:Description>
<RDF:Description
RDF:about="chrome://app/content/my/window.xul#uri_of_the_rdf_resource"
hidden="false" />
But in this case, the persistent attribute will no be restored, because
it is searched as uri_of_the_rdf_resource. The proof is that if I change
the above to (and the corresponding resource) in localstore.rdf to :
<RDF:Description RDF:about="chrome://app/content/my/window.xul">
<NC:persist RDF:resource="uri_of_the_rdf_resource"/>
....
</RDF:Description>
<RDF:Description RDF:about="uri_of_the_rdf_resource"
> <RDF:Description RDF:about="chrome://app/content/my/window.xul">
> <NC:persist RDF:resource="uri_of_the_rdf_resource"/>
> ....
> </RDF:Description>
>
> <RDF:Description RDF:about="http://daim.project.org/granulo#perimeter"
> hidden="false" />
>
> Then, the persistent attribute will be restored.
>
> I suspect that this is simply because the builder will look after the
> name of the ressource in the uri for persistent data name and not for
> the resource name as stored in localstore.
The resource name as stored in localstore was changed because the format
wasn't consistent. However the fact that the builder appears only to
work with the old format would seem to be a bug. Which software
version(s) were you trying this with?
--
Warning: May contain traces of nuts.
This was tested with xulrunner 1.8.0.1 and 1.8.0.4
The 1.8.0.1 use the old localstore format and thus the retrieval of
persistent attributes work as expected and it fails in the 1.8.0.4
version where the format has been changed.
David Marteau a écrit :
> Should I file a bug ?
> I think I can provide a testcase.
Yes, I think that would be best, particularly if you can write one that
can be loaded in Firefox 1.5.0.1, 1.5.0.4, 2.0RC and Minefield (trunk)
to make it easier for the developers; please CC the following people and
myself on the bug:
ax...@pike.org
bzba...@mit.edu
ennd...@sympatico.ca