mail-archives/gtk-sharp-list/2002-September/000316.html

83 строки
2.8 KiB
HTML

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<TITLE> [Gtk-sharp-list] events and TextView/Buffer
</TITLE>
<LINK REL="Index" HREF="index.html" >
<LINK REL="made" HREF="mailto:miguel%40ximian.com">
<META NAME="robots" CONTENT="index,nofollow">
<LINK REL="Previous" HREF="000311.html">
<LINK REL="Next" HREF="000318.html">
</HEAD>
<BODY BGCOLOR="#ffffff">
<H1>[Gtk-sharp-list] events and TextView/Buffer
</H1>
<B>Miguel de Icaza
</B>
<A HREF="mailto:miguel%40ximian.com"
TITLE="[Gtk-sharp-list] events and TextView/Buffer">miguel@ximian.com
</A><BR>
<I>08 Sep 2002 13:36:40 -0400</I>
<P><UL>
<LI> Previous message: <A HREF="000311.html">[Gtk-sharp-list] events and TextView/Buffer
</A></li>
<LI> Next message: <A HREF="000318.html">[Gtk-sharp-list] events and TextView/Buffer
</A></li>
<LI> <B>Messages sorted by:</B>
<a href="date.html#316">[ date ]</a>
<a href="thread.html#316">[ thread ]</a>
<a href="subject.html#316">[ subject ]</a>
<a href="author.html#316">[ author ]</a>
</LI>
</UL>
<HR>
<!--beginarticle-->
<PRE>Hello!
&gt;<i> The way I'm trying to handle the event in my code is with a function
</I>&gt;<i> that looks like this:
</I>&gt;<i>
</I>&gt;<i> private void TextWasInserted(object sender, InsertAtCursorArgs e)
</I>&gt;<i> {
</I>&gt;<i> Console.WriteLine(&quot;Event handled&quot;);
</I>&gt;<i> }
</I>&gt;<i>
</I>&gt;<i> and then I try and hook in the event handler with:
</I>&gt;<i>
</I>&gt;<i> view.InsertAtCursor += new InsertAtCursorHandler(TextWasInserted);
</I>&gt;<i>
</I>&gt;<i> However, nothing happens. Should this work? Is this the wrong approach?
</I>&gt;<i> I've tried similar things and attempted event handling on the TextBuffer
</I>&gt;<i> as well, but events on the TextBuffer give Glib-GObject-CRITICAL
</I>&gt;<i> messages on the console.
</I>
Please provide more information about the error.
I believe this is invoked only when you call the functions from the C
code. What are you trying to do?
My guess is that you want the &quot;changed&quot; signal, and not really the
insert one.
Miguel
</PRE>
<!--endarticle-->
<HR>
<P><UL>
<!--threads-->
<LI> Previous message: <A HREF="000311.html">[Gtk-sharp-list] events and TextView/Buffer
</A></li>
<LI> Next message: <A HREF="000318.html">[Gtk-sharp-list] events and TextView/Buffer
</A></li>
<LI> <B>Messages sorted by:</B>
<a href="date.html#316">[ date ]</a>
<a href="thread.html#316">[ thread ]</a>
<a href="subject.html#316">[ subject ]</a>
<a href="author.html#316">[ author ]</a>
</LI>
</UL>
</body></html>