Hi Daniel,
thanks for your help on the syntax necessary to use InstallTrigger.install() method.
I went to Netscape's feedback pages and pressed some links and the browser just sat
there and
did not go anywhere which is why
I am pursuing you.
Inside the callback function, I can access the window and navigator.plugins object.
However,
due to an unknown reason,
I cannot access the location and document object in the callback function?! I do not
know
why this is so but I cannot try
your "fiddling with the window location" because I cannot access the location object.
Also,
I cannot call window.navigate() !?(don't know why?)
Unfortunately, pressing the Reload button does not fix the problem either, I need to
close
and re-open the browser for the newly installed plugin to show up.
Do you have any other work-around which could fix this without closing the browser ?
Oh, one last thing, in your last email, you mention that I am looking in the wrong
place (for
InstallTrigger.install's routine). Where should I look in ? Which
link has the correct api signatures and new object list (Install,
InstallTrigger,etc...) ? I
was looking at David Epstein's XPInstall QA - XPInstall APIs page
but it is apparently obsolete.
thanks for all your feedback; you are very helpful,
Charles Henri d'Argent, ingenieur en informatique
Daniel Veditz wrote:
> First of all, Willamette is right that navigator.plugins.refresh(true) is
> broken in general. Keep an eye on
> http://bugzilla.mozilla.org/show_bug.cgi?id=61388
>
> Charles Henri d'Argent wrote:
> >
> > this message is addressed to the developers of Netscape 6.
>
> These newsgroups are for the developers of the Mozilla browser. Since
> Netscape bases its browser on Mozilla you might get lucky, but in general
> you should address Netscape issues to Netscape via its feedback pages which
> are available from the Help menu within Netscape 6.
>
> > I am experiencing the same behavior: I can not access the navigator object
> > inside the install.js script that the Netscape 6 thread is executing. Even
> > worst, I cannot access the window object. I must call
>navigator.plugins.refresh(true);
>
> Install scripts run in their own context on their own thread. The global
> object is the Install object, and there is no window object because there is
> no window to which it could possibly refer. You will never be able to access
> any window objects from an install because of threading issues with our
> single-threaded UI. We may eventually figure out a way to let scripts spawn
> a window on the UI thread and how to proxy information back to the calling
> script.
>
> For trivial things we do support alert() and confirm(), but not a generic
> window.
>
> > if I want the newly installed plugin to be visible just after performing
> > SmartUpdate.
> >
> > 1.) How can I access the window object through Netscape 6's thread inside
> > install.js ?
>
> You can't.
>
> > 2.) Is there some XPInstall api that replaces this plugins.refresh(true) call ?
> > In which case, which function is it ? In which class ?
>
> You can't now, but eventually there will be a way. Keep an eye on
> http://bugzilla.mozilla.org/show_bug.cgi?id=62916
>
> I'm being paid to fix that one, so I can be fairly confident in saying it'll
> work in the next 6.x (*NOT* 6.0x) release of Netscape 6 barring major
> personal disaster.
>
> > 4.) Is there some work-around to refresh ? (Besides closing the browser and
> > re-starting it).
>
> The workaround was intended to be as Willamette says:
>
> > > You can specify a callback function in the InstallTrigger.install() method.
> > > Since the callback is called when the installation is completed, I figured I
> > > would call navigator.plugins.refresh(true) there.
>
> Unfortunately that's not currently working either as he goes on to say.
> Supposedly navigator.plugins.refresh(false) works to reload the plugins
> list, so you then only have to figure out how to reload the page manually.
> Perhaps fiddling with the window location will do it, or worst case pop up
> an alert() asking the user to reload the page.
>
> -Dan Veditz