MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <16504.63649.853529.712052 at soggy.deldotd.com> Date: Sun, 11 Apr 2004 00:49:53 -0700 To: lablgtk at kaba.or.jp Subject: accessing upper level widget signals from gEdit widget ? From: briand at aracnet.com I have an Entry widget : let cmd_line_entry = GEdit.entry ~packing:vb#pack ~editable:true ~max_length:50 () and 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 I traced through the inheritance carefully and it seems that the gEdit does NOT inherit Widget event signals. It inherits gtkobj_signals which only includes after and destroy. However, since the GEdit object _is_ a widget, that means that I should have access to widget signals, so I tried: (cmd_line_entry :> GObj.widget)#connect#enter_notify ~callback:(fun () -> print_string "ENTER_NOTIFY\n"; flush stdout; true); Which doesn't work of course because the low level widget type does NOT include a connect method. This expression has type GObj.widget It has no method connect Help ? Brian