зеркало из https://github.com/mono/mail-archives.git
97 строки
3.8 KiB
HTML
97 строки
3.8 KiB
HTML
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
|
||
|
<HTML>
|
||
|
<HEAD>
|
||
|
<TITLE> [Gtk-sharp-list] Glade & 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 & Viewport
|
||
|
</H1>
|
||
|
<B>Freon
|
||
|
</B>
|
||
|
<A HREF="mailto:Freon%20%3Cfreongrr%40gmail.com%3E"
|
||
|
TITLE="[Gtk-sharp-list] Glade & Viewport">Freon <freongrr@gmail.com>
|
||
|
</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 & 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:
|
||
|
"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()"
|
||
|
|
||
|
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 <<A HREF="mailto:tberman@off.net">tberman@off.net</A>> wrote:
|
||
|
><i> On Sun, 2004-08-29 at 10:15 +0200, Freon wrote:
|
||
|
</I>><i> > Something like this should work:
|
||
|
</I>><i> >
|
||
|
</I>><i> > [Widget] protected Widget yourWidget =3D null;
|
||
|
</I>><i> > ...
|
||
|
</I>><i> > Glade.XML gxml =3D new Glade.XML("gui.glade",
|
||
|
</I>><i> > "yourWidget", null);
|
||
|
</I>><i> > gxml.Autoconnect (this);
|
||
|
</I>><i> > this.viewPort.Add(yourWidget);
|
||
|
</I>><i> >
|
||
|
</I>><i> > Of course, this widget needs to be placed inside a window in Glade,
|
||
|
</I>><i> > but you don't have to use it.
|
||
|
</I>><i>=20
|
||
|
</I>><i> That is asking for trouble. Lots and lots of ugly trouble.
|
||
|
</I>><i>=20
|
||
|
</I>><i> If you go and look at the MonoDevelop source, there is a class called
|
||
|
</I>><i> GladeWidget. You can write code that subclasses that widget, and it
|
||
|
</I>><i> abstracts the reparenting and adding of the widgetry. We use it inside
|
||
|
</I>><i> MonoDevelop for all of the option dialogs and such.
|
||
|
</I>><i>=20
|
||
|
</I>><i> --Todd
|
||
|
</I>><i>=20
|
||
|
</I>><i>
|
||
|
</I>
|
||
|
</PRE>
|
||
|
<!--endarticle-->
|
||
|
<HR>
|
||
|
<P><UL>
|
||
|
<!--threads-->
|
||
|
<LI> Previous message: <A HREF="004788.html">[Gtk-sharp-list] Glade & 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>
|