Re: Glib::SignalProxyProperty Problem



On Tue, 2005-02-15 at 14:37 +0100, Gunther Laure wrote:
> Hi!
> 
> As I understand, Glib::SignalProxyProperty allows to query a Gtk::Widget
> for an existing signal using the signals string name ("clicked")

No, SignalProxyProperty() allows you to receive notification of changes
to properties. There's nothing I can see in the API that would allow you
to provide a signal name.

And you are not intended to use this directly. It is returned by
property_*() accessor methods.

> The method Glib::SignalProxyProperty::connect then should allow me to
> connect the signal to an arbitrary method handler (eg sigc::ptr_fun ...)
> as long as the method signature matches.

I don't think there is anything in glibmm to connect a signal by name at
runtime. How could the compiler or runtime know that your method
signature matches? You can use the glib API.

Is this for some generic thing, or have we forgotten to wrap some
signal?

> Am I wrong in this assumptions? My test program using
> Glib::SignalProxyProperty with libglade created widget instantias
> compiles but does nothing...
> 
> 
> I peeked into the source code and saw that  the static method
> SignalProxyProperty::callback is called by the widgets "notify" signal.
> 
> if(strcmp(property_name_changed, property_name_monitored) == 0)
> 
> is never true here, because property_name_changed is eg "clicked" for a
> button, but  property_name_monitored seems always to be "style"? (I do
> not know why)
> 
> Any hints or tips for me?
> 
> By Gunther
> 
> PS: Sorry that I sent this mail to two mailing lists.

-- 
Murray Cumming
murrayc murrayc com
www.murrayc.com
www.openismus.com




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