[Gtk-sharp-list] Toolbar signal problem...
Pablo Baena
pbaena@uol.com.ar
18 Oct 2002 00:57:52 +0000
--=-gl+kiaOonJBKt0U0IN0x
Content-Type: multipart/alternative; boundary="=-eqs28EPVsIjYTmprBiiP"
--=-eqs28EPVsIjYTmprBiiP
Content-Type: text/plain
Content-Transfer-Encoding: 7bit
This example segfaults. Can someone help me debug it? I'll open a bug in
bugzilla soon anyways, and keep trying to find out why this fails.
Thanks!!!
Pablo
--=-eqs28EPVsIjYTmprBiiP
Content-Type: text/html; charset=utf-8
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 TRANSITIONAL//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; CHARSET=UTF-8">
<META NAME="GENERATOR" CONTENT="GtkHTML/1.0.4">
</HEAD>
<BODY>
<BR>
This example segfaults. Can someone help me debug it? I'll open a bug in bugzilla soon anyways, and keep trying to find out why this fails.
<BR>
<BR>
Thanks!!!
<BR>
Pablo
<BR>
</BODY>
</HTML>
--=-eqs28EPVsIjYTmprBiiP--
--=-gl+kiaOonJBKt0U0IN0x
Content-Disposition: attachment; filename=toolbar_problem.cs
Content-Transfer-Encoding: quoted-printable
Content-Type: text/plain; name=toolbar_problem.cs; charset=ISO-8859-1
namespace DebugProblem {
using System;
using Gtk;
using GtkSharp;
using System.Diagnostics;
public class Test {
static Gnome.App window =3D null;
static Toolbar toolbar =3D null;
public static void Main(string[] args) {
Gnome.Program kit =3D new Gnome.Program ("gnomencoder", "0.0.1", Gnome.M=
odules.UI,
args);
Create();
RunProcess(); =09
kit.Run ();
}
public static void Create ()
{
window =3D new Gnome.App ("gnomencoder", "GnoMencoder");
toolbar =3D new Toolbar ();
toolbar.InsertStock (Stock.New, "Stock icon: New", "Toolbar/New",
new SignalFunc (bla), IntPtr.Zero, -1);
window.Toolbar =3D toolbar;
window.ShowAll ();
=09
}
=09
static void RunProcess()
{
ProcessStartInfo psi =3D new ProcessStartInfo();
psi.FileName=3D"ls";
psi.Arguments=3D"-lh /usr/doc/";
psi.RedirectStandardOutput=3Dtrue;
Process p =3D Process.Start(psi);
string output;
while ((output =3D p.StandardOutput.ReadLine())!=3Dnull)
{
}
=09
p.WaitForExit();
}
=09
static void bla (Gtk.Object obj)
{
Console.WriteLine("Caca");
}
}
}
--=-gl+kiaOonJBKt0U0IN0x--