Hey,
first your way of connecting to the "Changed" event seems to be very
strange. Why don't you use
if (widget is Gtk.Editable) {
(widget as Gtk.Editable).Changed += this.OnWidgetChanged ;
}?
if that doesn't help, try applying the [GLib.ConnectBeforeAttribute] to
the OnWidgetChanged method; see
http://gtk-sharp.sourceforge.net/faq.html#3.3 (but that doesn't seem to
be the reason in this case).
Christian
Wolfgang Mauer schrieb:
> Hi all,
> i try'd to bind a Method("OnWidgetChanged") to the "Changed"-Event of some
> Widgets but like this the event never raised.
> Any Help?
>
> EventInfo eInfo = this.widget.GetType().GetEvent("Changed");
> if (eInfo != null)
> {
> MethodInfo mi = this.GetType().GetMethod("OnWidgetChanged",
> BindingFlags.Instance | BindingFlags.NonPublic);
> if (mi != null)
> {
> Delegate del =
> Delegate.CreateDelegate(eInfo.EventHandlerType, this, mi);
> if (del != null)
> {
> eInfo.AddEventHandler(this.widget, del);
> }
> }
> }
> ......
>
> void OnWidgetChanged(object sender, EventArgs e)
> {
> }
>
_______________________________________________
Gtk-sharp-list maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/gtk-sharp-list