[evolution-patches] Re: [Evolution-hackers] Re: GtkWidget events vs virtual methods?? [was Patch for bug 45826, please review]
- From: Ettore Perazzoli <ettore ximian com>
- To: Not Zed <notzed ximian com>
- Cc: Yiming Cao <maxx cao sun com>, evolution-patches <evolution-patches ximian com>, evolution-hackers ximian com
- Subject: [evolution-patches] Re: [Evolution-hackers] Re: GtkWidget events vs virtual methods?? [was Patch for bug 45826, please review]
- Date: 10 Jul 2003 18:16:49 -0400
On Thu, 2003-07-10 at 06:04, Not Zed wrote:
> Hmm, good point. I've bounced this to evolution-hackers.
>
> I have no idea, does anybody who understands Gtk+ out there have any
> idea on this?
Overriding the virtual methods for signals is OK. It's pretty common
when you subclass widgets, eg. GtkToggleButton overrides the "clicked"
signal that it inherits from GtkButton.
> I never understood why signals had class pointers in the first place.
The basic idea with signals is to have virtual methods whose behavior
can be overloaded without having to subclass. So they act like event
notifications, but they are still virtual methods too.
The virtual method's implementation simply gets invoked when the signal
is emitted (either before or after the signals' callbacks, depending on
the signal's flags).
-- Ettore
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]