Re: explicit signal connection vs. overriding function
- From: Piscium <groknok yahoo ie>
- To: gtkmm-list gnome org
- Subject: Re: explicit signal connection vs. overriding function
- Date: Tue, 11 May 2010 18:12:31 +0000 (GMT)
Correct, thanks. I had also realized I made a mistake there, but only a few hours after sending the email.
----- Original Message ----
From: Murray Cumming <murrayc murrayc com>
To: Piscium <groknok yahoo ie>
Cc: gtkmm-list gnome org
Sent: Tue, 11 May, 2010 7:47:36
Subject: Re: explicit signal connection vs. overriding function
On Mon, 2010-05-10 at 20:50 +0000, Piscium wrote:
> And what are the advantages of each way of connecting signals?
>
> It seems to me that overriding a signal method requires less typing,
> and results perhaps in more readable code.
Yes, that's the point of the default signal handlers.
> On the other hand, the method on_expose_event used in DrawingArea is
> protected, so one can override it only if one derives from
> DrawingArea, which may not be always expedient.
You can only override any virtual method by deriving, regardless of
whether it is public/protected/private.
--
murrayc murrayc com
www.murrayc.com
www.openismus.com
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]