What I would like to do is set up observers for broadcaster variables
defined in top
top xul
<broadcasterset>
<broadcaster id="broadcast" />
</broadcasterset>
iframe xul
<element observes="top.broadcast" />
this doesn't seem to work
- should it ?
or is the syntax wrong?
or is there an application wide broadcast?
Broadcasters only work within one document. You'll need to do some
scripting if you wish to do inter-document communication. There are
tools available if your code is privileged (like nsIObserverService or
a custom service) or you can implement some code to communicate
between frames manually.
Nickolay
Given the simplicity of the "observes" method, do you think that extending
the basic "observes" method to refer to the top most document broadcaster
element would be possible (and simpler)?
<element observes="top.document.getElementById(('broadcast')" />
"Nickolay Ponomarev" <asqu...@gmail.com> wrote in message
news:mailman.691.11631789...@lists.mozilla.org...
There is template mechanism in XUL, which can be used to keep your UI
in multiple documents synchronized it from a common dataset.
Admittedly, templates are complicated, but the concept is there.
Nickolay
>
> "Nickolay Ponomarev" <asqu...@gmail.com> wrote in message
> news:mailman.691.11631789...@lists.mozilla.org...
> > On 11/9/06, rvj <m...@rolemodels.net> wrote:
> > > I have a nested xul application which means that some parts of the
> > > application are loaded in xul iframes.
> > > Top level functions can be called from xul iframes using
> top.functionname()
> > >
> > > What I would like to do is set up observers for broadcaster variables
> > > defined in top
> > >
> > > iframe xul
> > >
> > > <element observes="top.broadcast" />
> > >
> > > this doesn't seem to work
> >
> > Broadcasters only work within one document. You'll need to do some
> > scripting if you wish to do inter-document communication. There are
> > tools available if your code is privileged (like nsIObserverService or
> > a custom service) or you can implement some code to communicate
> > between frames manually.
> >
> > Nickolay
>
>
> _______________________________________________
> dev-tech-xul mailing list
> dev-te...@lists.mozilla.org
> https://lists.mozilla.org/listinfo/dev-tech-xul
>
I guess the "simplest" solution is to use the onchange event on a common
datasource to trigger a reset of the same broadcast variable attribute in
each document.
thanks
ail.com> wrote in message
news:mailman.849.11634162...@lists.mozilla.org...
Nickolay