Re: problem with signal_configure_event



On Mon, 2006-12-04 at 07:22 -0600, Jonathon Jongsma wrote:
> On 12/4/06, Murray Cumming <murrayc murrayc com> wrote:
> > On Sun, 2006-12-03 at 20:21 -0600, Jonathon Jongsma wrote:
> > > I seem to be having some issues getting the configure-event handler to
> > > fire.  If I connect a regular GTK+ signal handler, it works fine, and
> > > if I derive from the Window class and implement the virtual
> > > on_configure_event() function, it also works fine.  But it doesn't
> > > work if I use the normal connect() method.  Interestingly, it works if
> > > I use connect_notify(), however.    Can anybody explain this?  Is it a
> > > bug?  user error?  or is this expected behavior?
> >
> > Try a connect before, for instance with connect_notify().
> >
> 
> Yes, connect_notify() works, as I mentioned. But I don't understand
> why connect() doesn't work.  Especially since if you do a search for
> signal_configure_event() [1], all of the uses that show up in the
> results use connect() and not connect_notify()
> 
> [1]http://www.google.com/search?q=signal_configure_event&ie=UTF-8&oe=UTF-8

Possibly it depends on the widget. If a default signal handler in the C
code, or regular signal handler, returns TRUE then there's no way your
"connect-after" (the default in gtkmm) will be called:
http://www.gtkmm.org/docs/gtkmm-2.4/docs/tutorial/html/apbs06.html

Whether or not gtkmm signals should always connect after (like regular
libsigc++ signals would, but not like g_signal_connect() does) is a
point of controversy, but it's not going to change any time soon.

-- 
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]