所以我一直在更新FF4和Gecko 2使用的旧扩展,但我有一些问题,我得到一个错误,说classID缺失或不正确的组件....Firefox扩展开发firefox4
有没有其他人有类似的问题或知道如何解决这个问题?
function jsshellClient() {
this.classDescription = "sdConnector JavaScript Shell Service";
this.classID = Components.ID("{54f7f162-35d9-524d-9021-965a3ba86366}");
this.contractID = "@activestate.com/SDService?type=jsshell;1"
this._xpcom_categories = [{category: "sd-service", entry: "jsshell"}];
this.name = "jsshell";
this.prefs = Components.classes["@mozilla.org/preferences-service;1"]
.getService(Components.interfaces.nsIPrefService)
.getBranch("sdconnector.jsshell.");
this.enabled = this.prefs.getBoolPref("enabled");
this.port = this.prefs.getIntPref("port");
this.loopbackOnly = this.prefs.getBoolPref("loopbackOnly");
this.backlog = this.prefs.getIntPref("backlog");
}
jsshellClient.prototype = new session();
jsshellClient.prototype.constructor = jsshellClient;
当原型为这个调用generateNSGetFactory它给在FF4抱怨的classID错误控制台的错误。我很确定没有其他人使用相同的GUID,所以我没有看到问题。
为什么不发布导致错误的代码? – 2010-10-22 13:37:14