mail-archives/gtk-sharp-list/2004-August/004791.html

97 строки
3.8 KiB
HTML

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<TITLE> [Gtk-sharp-list] Glade &amp; Viewport
</TITLE>
<LINK REL="Index" HREF="index.html" >
<LINK REL="made" HREF="mailto:Freon%20%3Cfreongrr%40gmail.com%3E">
<META NAME="robots" CONTENT="index,nofollow">
<LINK REL="Previous" HREF="004788.html">
<LINK REL="Next" HREF="004786.html">
</HEAD>
<BODY BGCOLOR="#ffffff">
<H1>[Gtk-sharp-list] Glade &amp; Viewport
</H1>
<B>Freon
</B>
<A HREF="mailto:Freon%20%3Cfreongrr%40gmail.com%3E"
TITLE="[Gtk-sharp-list] Glade &amp; Viewport">Freon &lt;freongrr@gmail.com&gt;
</A><BR>
<I>Sun, 29 Aug 2004 15:20:46 +0200</I>
<P><UL>
<LI> Previous message: <A HREF="004788.html">[Gtk-sharp-list] Glade &amp; Viewport
</A></li>
<LI> Next message: <A HREF="004786.html">[Gtk-sharp-list] Gtk entry only for digits?
</A></li>
<LI> <B>Messages sorted by:</B>
<a href="date.html#4791">[ date ]</a>
<a href="thread.html#4791">[ thread ]</a>
<a href="subject.html#4791">[ subject ]</a>
<a href="author.html#4791">[ author ]</a>
</LI>
</UL>
<HR>
<!--beginarticle-->
<PRE>Hmm, thanks for that, I've just tried that and it's true it's a nice
way to do it. But now I'm flooded with errors ;)
I get null reference errors now, but the only message I get is:
&quot;La r=E9f=E9rence d'objet n'est pas d=E9finie =E0 une instance d'un objet.
at Gtk.Application.gtk_main()
at Gtk.Application.Run()&quot;
Which doesn't really help me, but tells me there's something wrong
with my widget. I thought the signals were causing that so I removed
them from the .glade file and now create them with code (like you do
on MonoDevelop it seems?).
But I still get random crashes and I can't find where they're coming from..=
.
So, how can I debug something crashing withing the Gtk code? Is there
a way to have more information on this kind of errors?
On Sun, 29 Aug 2004 04:23:48 -0400, Todd Berman &lt;<A HREF="mailto:tberman@off.net">tberman@off.net</A>&gt; wrote:
&gt;<i> On Sun, 2004-08-29 at 10:15 +0200, Freon wrote:
</I>&gt;<i> &gt; Something like this should work:
</I>&gt;<i> &gt;
</I>&gt;<i> &gt; [Widget] protected Widget yourWidget =3D null;
</I>&gt;<i> &gt; ...
</I>&gt;<i> &gt; Glade.XML gxml =3D new Glade.XML(&quot;gui.glade&quot;,
</I>&gt;<i> &gt; &quot;yourWidget&quot;, null);
</I>&gt;<i> &gt; gxml.Autoconnect (this);
</I>&gt;<i> &gt; this.viewPort.Add(yourWidget);
</I>&gt;<i> &gt;
</I>&gt;<i> &gt; Of course, this widget needs to be placed inside a window in Glade,
</I>&gt;<i> &gt; but you don't have to use it.
</I>&gt;<i>=20
</I>&gt;<i> That is asking for trouble. Lots and lots of ugly trouble.
</I>&gt;<i>=20
</I>&gt;<i> If you go and look at the MonoDevelop source, there is a class called
</I>&gt;<i> GladeWidget. You can write code that subclasses that widget, and it
</I>&gt;<i> abstracts the reparenting and adding of the widgetry. We use it inside
</I>&gt;<i> MonoDevelop for all of the option dialogs and such.
</I>&gt;<i>=20
</I>&gt;<i> --Todd
</I>&gt;<i>=20
</I>&gt;<i>
</I>
</PRE>
<!--endarticle-->
<HR>
<P><UL>
<!--threads-->
<LI> Previous message: <A HREF="004788.html">[Gtk-sharp-list] Glade &amp; Viewport
</A></li>
<LI> Next message: <A HREF="004786.html">[Gtk-sharp-list] Gtk entry only for digits?
</A></li>
<LI> <B>Messages sorted by:</B>
<a href="date.html#4791">[ date ]</a>
<a href="thread.html#4791">[ thread ]</a>
<a href="subject.html#4791">[ subject ]</a>
<a href="author.html#4791">[ author ]</a>
</LI>
</UL>
</body></html>