зеркало из https://github.com/mono/mail-archives.git
83 строки
2.8 KiB
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!
|
|
|
|
><i> The way I'm trying to handle the event in my code is with a function
|
|
</I>><i> that looks like this:
|
|
</I>><i>
|
|
</I>><i> private void TextWasInserted(object sender, InsertAtCursorArgs e)
|
|
</I>><i> {
|
|
</I>><i> Console.WriteLine("Event handled");
|
|
</I>><i> }
|
|
</I>><i>
|
|
</I>><i> and then I try and hook in the event handler with:
|
|
</I>><i>
|
|
</I>><i> view.InsertAtCursor += new InsertAtCursorHandler(TextWasInserted);
|
|
</I>><i>
|
|
</I>><i> However, nothing happens. Should this work? Is this the wrong approach?
|
|
</I>><i> I've tried similar things and attempted event handling on the TextBuffer
|
|
</I>><i> as well, but events on the TextBuffer give Glib-GObject-CRITICAL
|
|
</I>><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 "changed" 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>
|