[Jslib] Re: uninstall
Pete Collins
petejc@optonline.net
Sun, 15 Sep 2002 11:36:27 -0400
Unfortunately uninstall is not complete. It was working way back, but
due to many changes that have transpired since it is now non functional.
Help would be appriciated here. ;-)
Sorry.
--pete
dwx wrote:
> I'm trying to use jsLib's uninstall library in BannerBlind. The code I
> have is as followed:
>
> /*********** pref.js **************/
> function uninstall(){
> if (!confirm(bundle.getString("uninstall.confirm")))
> return false
>
> dump("BannerBlind: Uninstall\n");
> // include('chrome://jslib/content/jslib.js');
> include('chrome://jslib/content/install/uninstall.js');
>
> try {
> uninstall = new Uninstall('bannerblind');
> uninstall.uninstallPackage();
> alert(bundle.getString("uninstall.finish"));
> window.close();
> } catch(e) {
> alert('uninstallation failed. '+e);
> }
> }
>
> /********** pref.xul ***********/
> <window ...>
> <script type="application/x-javascript"
> src="chrome://jslib/content/jslib.js"/>
> :
> <button
> id="button-uninstall"
> class="dialog"
> label="&bb.uninstall;"
> oncommand="uninstall()"/>
>
>
> When I run the uninstall() function, I got two alerts. The first is
> "bannerblind is now
> uninstalled . . ." which is apparently jsLib's own message, and the
> second is
> "uninstall finish." When I restarts Mozilla, however, I found
> bannerblind hasn't been
> uninstalled. I don't know the proper way of using the library,
> uninstall = new Uninstall('bannerblind');
> uninstall.uninstallPackage();
> is the best I could infer from uninstall.js. Can anybody help me out
> debugging this?