From: Joe Van Dyk Date: 2005-07-22T07:39:03+09:00 Subject: Re: ruby gnome question On 7/21/05, Aredridel wrote: > > > So, when the menu bar gets clicked, a signal gets emitted in the Menu > > Bar object. How can the Application Window object know that a menu > > bar gets clicked? Do I need to create a new signal to notify the > > Application Window? > > Just define a handler for the signal that calls methods on the > application window object, either finding it based on navigating up the > widget tree, or just hard-coding: > > class MenuBar < Gtk::MenuBar > def initialize(app) > super() > # create menu buttons > @app = app > # here, connect_signal -- connect_signal('clicked') { @app.frob } > show > end > end > I forgot to mention that I had tried that already. I think there was a problem with the super() call in MenuBar::Initialize as it was passing the application window object to the Gtk::MenuBar initializer.