GtkHTML core dump
| From: | gpb at gpb dot seanet dot com | Date: | Thu, 31 Jan 2002 19:06:39 +0000 |
| Subject: | GtkHTML core dump | ||
| Groups: | php.gtk.general | ||
| Request: | Send a blank email to php-gtk-general+get-1094@lists.php.net to get a copy of this message | ||
Hello,
I'm just starting out with php-gtk, and am having a problem with a script core
dumping when using GtkHTML. If anyone could tell me whether the problem is in
my code, or if the problem is with PHP-GTK, I would be most appreciative. I
have included a sample script that causes a core dump when run.
thanks,
Greg
<?
if (!class_exists('gtk')):
if (strtoupper(substr(PHP_OS, 0, 3)) == 'WIN'):
dl('php_gtk.dll');
else:
dl('php_gtk.so');
endif;
endif;
function shutdown() {
gtk::main_quit();
}
$title = 'gtkhtml test';
$html = <<< EndHTML
<html><head><title>$title</title></head>
<body><h1>test</h1></body></html>
EndHTML;
$window = &new GtkWindow();
$window->connect('destroy', 'shutdown');
$window->set_title($title);
$window->set_border_width('10');
$window->set_usize(400, 250);
$gtkhtml = &new GtkHTML();
$gtkhtml->set_usize(200,200);
$stream = $gtkhtml->begin();
$gtkhtml->write($stream, $html, strlen($html));
$gtkhtml->end($stream, GTK_HTML_STREAM_OK);
$label = &new GtkLabel();
$label->set_text($title);
$box = &new GtkHBox();
$box->pack_start($label);
$box->pack_start($gtkhtml);
# this is where I get a core dump
$window->add($box);
$window->show_all();
gtk::main();
?>