[Project_owners] (Components.interfaces.nsIPrefService).getBoolPref is not a function in sidebar

Philip Chee philip.chee at gmail.com
Fri Dec 30 13:27:17 EST 2005


Hi,

I'm getting a js error as follows:

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

Context: backporting the Firefox XUL sidebar support to SEAMONKEY. The final
bit I need to get working is the WebPanel (web-panels.xul). And in fact it
IS working - except for the context menu.

The context menu is poping up, but due to the js errors, none of the menu
items work.

This error is coming from [contentAreaUtils.js]. Do I need to do something
with XPCNativeWrappers?

This sidebar has a browser element that can contain remote http content.

  <popupset id="mainPopupSet">

    <popup id="contentAreaContextMenu"
           onpopupshowing="if (event.target != this) return true;
gContextMenu = new nsContextMenu( this ); return gContextMenu.shouldDisplay;"
           onpopuphiding="if (event.target == this) { gContextMenu.hiding();
gContextMenu = null; }">
   ....menu items....
    </popup>
  </popupset>

  <browser id="web-panels-browser" persist="cachedurl"
           type="content"
           flex="1"
           context="contentAreaContextMenu"
           onclick="return window.parent.contentAreaClick(event, true);"/>

Phil
-- 
-==-
Philip Chee <philip at aleytys.pc.my>, <philip.chee at gmail.com>
http://flashblock.mozdev.org/
Guard us from the she-wolf and the wolf, and guard us from the thief,
oh Night, and so be good for us to pass.


More information about the Project_owners mailing list