因此,我一直在努力更新旧扩展以供 FF4 和 Gecko 2 使用,但我遇到了一些问题,我收到一个错误,提示组件的 classID 丢失或不正确......
有没有其他人遇到过类似的问题或知道如何解决这个问题?
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,所以我看不到问题所在。