Philip Chee wrote:
Error:
Components.classes['@mozilla.org/preferences-service;1'].getService(Components.interfaces.nsIPrefService).getBoolPref
is not a function. Why is this happening?

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

See:

http://www.xulplanet.com/references/xpcomref/comps/c_preferencesservice1.html

Gerald
_______________________________________________
Project_owners mailing list
[email protected]
http://mozdev.org/mailman/listinfo/project_owners

Reply via email to