Re[2]: [PHP-GTK] Images
| From: | Andrei Zmievski | Date: | Sat, 14 Apr 2001 17:04:42 +0000 |
| Subject: | Re[2]: [PHP-GTK] Images | ||
| References: | 1 2 3 | Groups: | php.gtk |
| Request: | Send a blank email to php-gtk+get-1389@lists.php.net to get a copy of this message | ||
At 01:03 PM 4/14/01 +0200, Adam Rambousek wrote:
18: $window = &new GtkWindow(); 19: list($pixmap, $mask) = Gdk::pixmap_create_from_xpm($window->window,null, "some.xbm"); 20: $pixmapwid = &new GtkPixmap($pixmap, $mask); 21: $window->add($pixmapwid); 22: $window->show_all(); and the result -> Warning: pixmap_create_from_xpm() expects argument 1 to be gdkwindow, NULL given in pixmap.php on line 19 Warning: gtkpixmap() expects argument 1 to be gdkwindow, NULL given in pixmap.php on line 20 Warning: add() expects argument 1 to be gtkwidget, NULL given in pixmap.php on line 21This is because $window->window is NULL, since $window has not been realized yet. Do $window->realize() right before that and you should be fine. -Andrei