gtk-- problem :(
- From: Ronald Lembcke <es186 fen baynet de>
- To: gtk-list redhat com
- Subject: gtk-- problem :(
- Date: Sun, 12 Apr 1998 17:59:21 +0200 (CEST)
Hi!
I hope this is the right place to ask (or does a gtk-- mailinglist exist?
than I'd ask there ... but didn't notice one till now...)
Ok... I just want a CList in a window with a few other widgets...
But it produces the following error, and I have no idea where it
comes from... :(
As this is my first program in gtk-- its quite possible that
there are some absolutly silly mistakes in it... but I don't see 'em
Oh... before I forget: gtk+ 0.99.10 gtk-- 0.7.18
When I start the program it say:
** WARNING **: invalid cast from (NULL) pointer to `GtkVScrollbar'
** WARNING **: invalid cast from (NULL) pointer to `GtkScrollbar'
** WARNING **: invalid cast from (NULL) pointer to `GtkRange'
** WARNING **: invalid cast from (NULL) pointer to `GtkWidget'
** WARNING **: invalid cast from (NULL) pointer to `GtkObject'
** ERROR **: sigsegv caught
Stack-Backtrace:
gtkmm_sigsegv (pos=0x4018ed37 "Gtk_Object::Gtk_Object(castitem)")
at gtk--.cc:38 38 *f=0; // sigsegv.
(gdb) backtrace
#0 gtkmm_sigsegv (pos=0x4018ed37 "Gtk_Object::Gtk_Object(castitem)")
at gtk--.cc:38
#1 0x40145e52 in Gtk_Object::Gtk_Object (this=0x80657d0, __in_chrg=0,
castitem=0x0) at gtk--.cc:76
#2 0x40146eb3 in Gtk_Widget::Gtk_Widget (this=0x80657d0, __in_chrg=0,
castitem=0x0) at gtk--.cc:360
#3 0x40150a33 in Gtk_Range::Gtk_Range (this=0x80657d0, __in_chrg=0,
castitem=0x0) at gtk--.cc:3124
#4 0x401512a3 in Gtk_Scrollbar::Gtk_Scrollbar (this=0x80657d0, __in_chrg=0,
castitem=0x0) at gtk--.cc:3325
#5 0x4014c8f3 in Gtk_VScrollbar::Gtk_VScrollbar (this=0x80657d0, __in_chrg=1,
castitem=0x0) at gtk--.cc:1923
#6 0x401562ff in Gtk_CList::Gtk_CList (this=0x806563c, __in_chrg=1,
columns=3, titles=0x0) at gtk--.cc:4689
#7 0x804a254 in TGameChoseWin::TGameChoseWin (this=0x80652f0, __in_chrg=1)
at main.cc:20
#8 0x804a583 in main (argc=1, argv=0xbffffb80) at main.cc:51
The Program looks like this:
#include <glib.h>
#include <gdk/gdk.h>
#include <gtk/gtk.h>
#include <String.h>
#include <gtk--.h>
class TGameChoseWin : public Gtk_Window
{
Gtk_VBox VBox1;
Gtk_CList GameList;
Gtk_HBox HBox1;
Gtk_Button ExitButton;
Gtk_Button StartButton;
public:
TGameChoseWin();
};
TGameChoseWin::TGameChoseWin()
: Gtk_Window(GTK_WINDOW_TOPLEVEL),
VBox1( FALSE, 5),
GameList( 3),
HBox1( TRUE, 0),
StartButton( "Start"),
ExitButton( "Exit")
{
set_title( "StarEmpires - Gamelist");
add( &VBox1);
VBox1.pack_start( &GameList, TRUE, TRUE, 0);
GameList.show();
VBox1.pack_start( &HBox1, FALSE, FALSE, 0);
HBox1.pack_start( &StartButton, TRUE, TRUE, 0);
StartButton.show();
HBox1.pack_start( &ExitButton, TRUE, TRUE, 0);
ExitButton.show();
HBox1.show();
VBox1.show();
}
int main( int argc, char *argv[])
{
Gtk_Main StarEmpires( &argc, &argv);
TGameChoseWin *GameChoseWin;
GameChoseWin = new TGameChoseWin();
GameChoseWin->show();
StarEmpires.run();
return( 0);
}
Thanks in advance...
Roni (IRC: _crash)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]