[Gtk-sharp-list] Glade & Viewport
Sun, 29 Aug 2004 15:20:46 +0200
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.
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 <firstname.lastname@example.org> wrote:
> On Sun, 2004-08-29 at 10:15 +0200, Freon wrote:
> > Something like this should work:
> > [Widget] protected Widget yourWidget =3D null;
> > ...
> > Glade.XML gxml =3D new Glade.XML("gui.glade",
> > "yourWidget", null);
> > gxml.Autoconnect (this);
> > this.viewPort.Add(yourWidget);
> > Of course, this widget needs to be placed inside a window in Glade,
> > but you don't have to use it.
> That is asking for trouble. Lots and lots of ugly trouble.
> If you go and look at the MonoDevelop source, there is a class called
> GladeWidget. You can write code that subclasses that widget, and it
> abstracts the reparenting and adding of the widgetry. We use it inside
> MonoDevelop for all of the option dialogs and such.