Philip Chee wrote:

On Tue, 03 Jan 2006 16:55:27 +0000, Neil wrote:
For the interest of anyone following this thread, the fix was checked in and 
approved for SeaMonkey 1.0 but the reason the bug was not noticed is that all 
the main XUL windows cache a copy of the preference service so that when the 
context menu tries to retrieve it it actually accesses the cached copy which 
already has the nsIPrefBranch interface.
So how can I do the same and cache a copy of the preference service for my 
extension?
I believe it suffices to just declare a global:
var pref = Components.interfaces["@mozilla.org/preferences-service;1"]
                    .getService(Components.interfaces.nsIPrefService)
                    .QueryInterface(Components.interfaces.nsIPrefBranch);
_______________________________________________
Project_owners mailing list
Project_owners@mozdev.org
http://mozdev.org/mailman/listinfo/project_owners

Reply via email to