Re: Static signals (was:(no subject) )



> Message: 5
> Date: Wed, 16 Mar 2005 08:11:06  0100
> From: Antonio Coralles <noche suapie reflex at>

> > I have a derived widget - derived from an EventBox. It has a funtion
"void
> > doShowHidden(bool);".
> >
> > There are several instances of these derived widgets on different
notebook
> > pages - so it is not easy to get direct access to them. So is is possible
> > that I could call all their doShowHidden(bool) functions with a signal?
> > They will all be either true or false - whatever the state of the
checkbox
> > is.
> >
> > So... how could I do that? All the examples of signals I've seen call
> > functions within the same class.
> >
> > -Sud.
>
> One way of doing this is the following (there may be better ones): Add a
> static signal to your class, und connect to that static signal in your
> constructor(s). If you want then to sent a signal to all instances, just
> trigger the static one ...
>
> antionio
>


I /think/ I get what you are saying... but doesn't a static signal require
a staic function? And static functions can only work with other static
variables and functions - nothing can happen to specific instances...

And I've not read that signals can propagate to children in libsigc  ...
It may be easier to maintain a list of pointers somewhere, so I can have
direct access...

-Sud.



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]