Re: Event Propagation problem



2012-01-16 21:23, lecas malecas skrev:
On Sun, Jan 15, 2012 at 6:26 PM, Kjell Ahlstedt
<kjell ahlstedt bredband net>  wrote:
Yes, it would be a good idea to update the Keyboard Events chapter.

Ok, I'll try to do that (should I reply to the same bug report of the chapter?).
You can either reopen the old keyboard event bug, or file a new bug report. I don't think it matters much which alterative you choose.
I realize now that the example program keyboard_events/simple has an
unfortunate mixture of overriding the default signal handler, and connecting
an extra signal handler. Similar to what Carlos first did, after my
incomplete description.

I just noticed that now, but it isn't how I had written. I think it
was changed in the commit.
It happened when Murray made your code conform to the (undocumented, I think) design rules for the example programs in the tutorial. He changed the name of the signal handler, and then it became an overridden virtual function.
ExampleWindow in the program keyboard_events/propagation needs both an
overridden default signal handler and an extra connected signal handler in
order to show what's going on. (Perhaps even one connected signal handler
that executes before the default handler, and another one after.)

Yes, I think I understand what you're saying. We can override the
on_key_release_event() (and write something to cout there), and then
call the Gtk::Window version (which will then work as is now).
And also have the one that is called before, so the messages would be:

window before
window overridden
entry
grid
window

And of course some more explanation in the tutorial text, but not nearly as
detailed as in this gtkmm-list thread.

Kjell

2012-01-14 23:41, lecas malecas skrev:

hey, maybe we should update that chapter to mention this part..




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