[Project_owners] rdf container manipulation problem

=?GB2312?B?1L7E3w==?= ni2yue4 at gmail.com
Sat Mar 25 20:42:56 EST 2006


Thank you for your advice. I'll move my datasource to profile dir. Now I
have a new problem. I want to reencode the webpage with my charset before it
is displayed. I wrote a  nsIWebProgressListener to set the charset of the
nsIDocCharset to my choice. like below:

onStateChange: function(aProgress, aRequest, aFlag, aStatus) {
> if(aFlag & STATE_START) {
>  frameNav.QueryInterface(Components.interfaces.nsIDocShell
> ).QueryInterface(Components.interfaces.nsIDocCharset).charset = charset;
> ...
> }
> }


If I enter url in the address bar and then press "GoTo" button or I click
the links in the webpage, it just works, but if I enter the url in the
address bar and hit "enter" key to load the url, it will fail. The
onStateChange function will be triggered and charset will be set, but it
seems that the charset will be reset in other place. I have no idea about
the difference between loading url with "GoTo" button and hitting "Enter"
key to load it. Could some one tell me what's the difference or there's some
other reason?


2006/3/25, Axel Hecht <axel at pike.org>:
>
>
> Those documents are sadly more of historic value than real
> documentation, at least in parts.
>
> Note that IO is probably not the answer here, I don't think we have a
> jar writer in our code.
>
> Why would you want to do that, anyway? It seems like you should store
> the modified rdf back to a location in the profile. FlushTo on
> nsIRDFRemoteDataSource may be your entry point. I'd suggest that you do
> that on first launch, copy your datasource over from chrome to profile,
> and then go from there.
>
> Or use a composite datasource, and amend your chrome based one with one
> in your profile, it really depends on what you need to do.
>
> Axel
> _______________________________________________
> Project_owners mailing list
> Project_owners at mozdev.org
> http://mozdev.org/mailman/listinfo/project_owners
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mozdev.org/pipermail/project_owners/attachments/20060325/c4035a51/attachment.htm


More information about the Project_owners mailing list