To: briand at aracnet.com Cc: lablgtk at kaba.or.jp Subject: Re: accessing upper level widget signals from gEdit widget ? In-Reply-To: <16504.63649.853529.712052 at soggy.deldotd.com> References: <16504.63649.853529.712052 at soggy.deldotd.com> Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-Id: <20040411214909D.garrigue at kurims.kyoto-u.ac.jp> Date: Sun, 11 Apr 2004 21:49:09 +0900 From: Jacques Garrigue Lines: 25 From: briand at aracnet.com > I am trying to connect it to an "ENTER_NOTIFY" event. > > So the naive attempt : > > cmd_line_entry#event#add [`ENTER_NOTIFY]; > cmd_line_entry#connect#enter_notify ~callback:(fun () -> print_string "ENTER_NOTIFY\n"; flush stdout; true); > > With error message : > > This expression has type GEdit.entry_signals > It has no method enter_notify The fix is: cmd_line_entry#event#connect#enter_notify ~callback:... As explained in the README (which is the only real documentation for lablgtk, so you have better read it in detail), everything concerning is in the #event sub-object, which is only available for widgets accepting events. (Note that the gtk hierarchy is wrong: all widgets are supposed to handle events, but it is not true, only those with a window can.) Jacques