"Tom Lee" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Hello,
>
> This might not be the right forum but I think someone here would be able
to
> help me - as the uninstall does use XPCOM. There is a sample toolbar on
the
> following site http://devedge.netscape.com/viewsource/2002/toolbar/. This
> sample is a nice example of creating a toolbar for Netscape. The author
was
> kind of enough to create an uninstall function to remove the toolbar - as
> there is not anyway to do so via the XPInstall API. The routine works
great
> on WINDOWS and I even implemented it for my own toolbar which contains
> several XPCOM components.
>
> The problem is on the MAC OS X platform. The toolbar will temporarily
> unistall itself - but ....as soon as you restart Netscape, the toolbar
will
> show itself again. Again this unistall works on the Windows Platform - but
> does not on the MAC. I think there might be one more step I have to do on
> the MAC. Does anybody have any experience with this?
>
> Anyhelp would be greatly appreciated.
>
> Thank you,
>
> Tom
>
>
Found the problem on the MAC OS X. This does not happen on Windows with the
same version of NEtscape (7.02). This is the code that blows up and causes
an unhandled exception to be generated.
// Interface change - ns7 (mozilla 1.0) needs nsIIOService, latter (mozilla
1.2) needs nsIFileProtocolHandler
if(Components.interfaces.nsIFileProtocolHandler)
{
var fileHandler =
ioService.getProtocolHandler("file").QueryInterface(Components.interfaces.ns
IFileProtocolHandler);
var myFileUrl = fileHandler.getURLSpecFromFile(fileRef);
<<<<<<<<<<<<<<<<< blows up right here!!!!!!!!!!!!!
}
else
{
var myFileUrl = ioService.getURLSpecFromFile(fileRef);
}