You answered my question via email that the typo is in the
message and not in the code.
The critical issues then are: 1) do you have C++ code in your
component that actually calls the component manager and registers
the specific contractid "Webterm"? (the generic module system as
in the nsSample code is prefered) and 2) does that registration
code get run? Debug builds run autoregistration on every startup
and find new components automatically. non-Debug builds do not do
this extra work on every startup, so you need to force auto
registration in your component installation process. See
nsIComponentManager.
Also, "Webterm" is a *very* bad name. Again, interface names and
contract ids go into a global namespace. You should choose a name
that is not likely to conflict with the names others choose - it
might work fine for you and conflict for some number of your
customers because they installed some other component using the
same bad name. This is why the contractids in the mozilla tree
have odd names like "@mozilla.org/registry;1". You might prefer
something like: "@PowerlanUSA/Webterm;1" (or whatever) to avoid
conflicts.
John.
Patrick McHale wrote:
>
> Since I have updated from Mozilla 0.8 to 0.9 the following javascript error
> occurs.
>
> file :///c:/Mozilla/Locations/NS6Hollis.thm line 7:
> Components.classes.webterm has no properties.
>
> I don't know why this is happening - there is NO error occurring when I
> use Mozilla 0.8.
>
> My javascript is:
> <SCRIPT LANGUAGE="javascript">
> netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
> var webterm1 = Components.classes["Webterm"].createInstance();
> webterm1 =
> webterm1.QueryInterface(Components.interfaces.nsIWebtermPluginInstance);
>
> In the C++ code I have defined:
>
> #define NS_WEBTERM_CONTRACTID "Webterm"
>
> Can anyone advise me please.
>
> With Thanks
>
> Patrick McHale
> Powerlan USA