Gtk-Perl and Pixmaps



Here we go again ;)  I'm having some trouble with
Gtk::Gdk::Pixmap->create_from_xpm.  When I call
Gtk::Gdk::Pixmap->create_from_xpm I get the error:
variable is not of type Gtk::Gdk::Pixmap at temp.pl line 7.

Here's a sample:

#!/usr/bin/perl

use Gtk;
init Gtk;

$window = new Gtk::Window -toplevel;
($pixmap, $mask) = Gtk::Gdk::Pixmap->create_from_xpm($window, #line 7
                         $window->style->bg('normal'), 'pixmaps/test.xpm');
show $window;

main Gtk;

---
Note: that line 7 is the G::G::P::create_from_xpm line above.
What boggles me most is that the same method for creating pixmaps works in
the Gtk/samples/test.pl script, but not here.  Am I missing something
really obvious?

============================================================================
==|  Dr Noonian Soong  |===|  Noonian@dal.net  |===|  Noonian on DALnet  |==
----------------------------------------------------------------------------
==|  "...and the fully armed nuclear warheads, are, of course, merely a  |==
==|                           courtesy detail."                          |==
============================================================================



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]