[Project_owners] Communicating between browser instances
waymost at gmail.com
Sun Jan 15 12:36:20 EST 2006
You can create XPCOM components in either JS or C++, depending on whether
the advantages of using C++ (speed, libraries, etc.) outweigh the
disadvantages (compilation, possible OS dependence, etc.). I would assume a
JS XPCOM component would be sufficient, but since I don't know what you're
doing, I can't say that for sure. In any event...
Creating XPCOM Components with JS:
Creating a C++ XPCOM Component: http://www.iosart.com/firefox/xpcom/
On 1/15/06, Steven D Tine <stevetine at yahoo.com> wrote:
> Thanks guys!
> Eric, you did a much better job of explaining what I
> wanted in one sentence than I did in my long winded
> e-mail..."it was more of a general extension design
> Now I've got something to go and investigate. If
> anyone knows of an extension that creates an XPCOM
> component, please let me know so I can see an example
> if possible.
> Thanks again!
> --- "Eric H. Jung" <grimholtz at yahoo.com> wrote:
> > I don't think he's asking how to fix SwitchProxy;
> > he's asking more of a
> > general extension design question. And the correct
> > answer, AFAIK, is
> > not to commmunicate changes between instances of
> > your extension via
> > preference updates, but to prevent multiple
> > instances of your extension
> > *in the first place*. Mook's XPCOM (can be done in
> > JS, C++ not needed)
> > suggestion is the way to go.
> > This has been discussed ad naseum at
> > forums.mozillazine.org. I did a
> > brief search to try to find some topics about it for
> > you, but didn't
> > come up with *precisely* what you're looking for.
> > Here's a thread which
> > discusses how to write and register a component in
> > your extension.
> > There *are* definitely, however, threads
> > specifically addressing your
> > question... do a little more thorough searching, or
> > simply post there
> > and ask--someone is bound to have the links.
> > http://forums.mozillazine.org/viewtopic.php?t=308369
> > Regards,
> > Eric Jung
> > --- Philip Chee <philip.chee at gmail.com> wrote:
> > > On Sat, 14 Jan 2006 20:13:14 -0800 (PST), Steven D
> > Tine wrote:
> > >
> > > > (proxy configured). The problem is that when
> > you have
> > > > two browser windows open, the status bar is not
> > in
> > > > sync between the two windows. By that I mean,
> > when
> > > > you click the icon in one window, the other
> > window is
> > > > not updated and the instance of the code in that
> > > > window does not know that a change happened, so
> > one
> > > > window shows red and one shows green but
> > obviously
> > > > there is only one proxy setting for both windows
> > so
> > > > one window is wrong. Is there a way for the
> > code in
> > > > the first instance to notify the code in the
> > other
> > > > window instances that a change was requested and
> > > > completed?
> > >
> > > > And to clarify my question, I don't just want to
> > > > update the icon, but actually somehow notify my
> > code
> > > > in the other instance to update some state and
> > then
> > > > update the icon.
> > >
> > > You basically set up a pref observer to monitor a
> > preference setting
> > > and
> > > when that setting changes you change your icon and
> > state. Look at how
> > > Flashblock does it. We have a toolbar button that
> > changes image
> > > depending on
> > > whether Flashblock is enabled or not. Clicking on
> > the button will
> > > toggle the
> > > enabled/disabled state. This change is propagated
> > to all instances of
> > > the
> > > toolbar button in each window.
> > >
> > > Phil
> > > --
> > > Philip Chee <philip at aleytys.pc.my>,
> > <philip.chee at gmail.com>
> > > http://flashblock.mozdev.org/
> > http://xsidebar.mozdev.org
> > > Guard us from the she-wolf and the wolf, and guard
> > us from the thief,
> > > oh Night, and so be good for us to pass.
> > > [ ]People with glass heads shouldn't.. ummm.. I
> > forgot..
> > > * TagZilla 0.059
> > > _______________________________________________
> > > Project_owners mailing list
> > > Project_owners at mozdev.org
> > > http://mozdev.org/mailman/listinfo/project_owners
> > >
> > __________________________________________________
> > Do You Yahoo!?
> > Tired of spam? Yahoo! Mail has the best spam
> > protection around
> > http://mail.yahoo.com
> > _______________________________________________
> > Project_owners mailing list
> > Project_owners at mozdev.org
> > http://mozdev.org/mailman/listinfo/project_owners
> Do You Yahoo!?
> Tired of spam? Yahoo! Mail has the best spam protection around
> Project_owners mailing list
> Project_owners at mozdev.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Project_owners