Philip Chee wrote:
On Fri, 30 Dec 2005 17:10:08 +0900, Gerald Vogt wrote:
nsIPrefService does not have the preference access functions like getBoolPref.
Only the branches do. So you need to access the interface nsIPrefBranch instead.
Components.classes["@mozilla.org/preferences-service;1"].getService(Components.interfaces.nsIPrefBranch).getBoolPref
The error is coming from:
<http://lxr.mozilla.org/seamonkey/source/xpfe/communicator/resources/content/nsContextMenu.js#281>
This was checked in as part of bug 7840.
<https://bugzilla.mozilla.org/show_bug.cgi?id=7840>
<https://bugzilla.mozilla.org/attachment.cgi?id=167914>
This was checked in just over a year ago. Don't tell me nobody noticed
something was wrong with the contextmenu? The aviary version did not have this
change.
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.
_______________________________________________
Project_owners mailing list
[email protected]
http://mozdev.org/mailman/listinfo/project_owners