GtkDialog Part 2
[email protected] (Rich Payne)
| Newsgroups | php.gtk |
|---|---|
| Message-ID | <[email protected]> |
I went revisiting my GtkDialog problems today and can make them
work....some of the time. Below are the contents of 2 files, called
main.php and error_dialog.php:
main.php:
<?php
dl ('php_gtk.so');
include ('error_dialog.php');
$test2 = &new error_dialog();
/* Run the main loop. */
Gtk::main();
?>
error_dialog.php:
<?php
dl ('php_gtk.so');
Class error_dialog extends GtkDialog {
function error_dialog() {
$this->GtkDialog();
$this->set_title("Something has gone wrong!");
$this->show_all();
var_dump($this->vbox);
}
}
if I run the main.php script, the var_dump (in the
error_dialog) produces NULL.
If I comment out the "dl ('php_gtk.so');" in main.php it works,
object(gtkvbox)(1) {
[0]=>
int(2)
}
If I do the reverse (have dl ('php_gtk.so'); in main.php but not in
error_dialog) it returns NULL.
Normally I'd think that I've screwed something up...except that it ONLY
seems to effect the behavior of GtkDialogs.
TIA,
--rdp
--
Rich Payne
[email protected] www.alphalinux.org