[prev in list] [next in list] [prev in thread] [next in thread] 

List:       php-gtk-general
Subject:    [PHP-GTK] GtkHTML core dump
From:       gpb () gpb ! seanet ! com
Date:       2002-01-31 19:06:39
[Download RAW message or body]

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();
?>


-- 
PHP-GTK General Mailing List (http://gtk.php.net/)
To unsubscribe, e-mail: php-gtk-general-unsubscribe@lists.php.net
For additional commands, e-mail: php-gtk-general-help@lists.php.net
To contact the list administrators, e-mail: php-list-admin@lists.php.net

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic