Re: arrow type




BoÅ¡tjan Å petiÄ? said:
hi

i'm using the 'arrow' widget... when i wnat to change direction with:
      $me->set('arrow-type' => 'right');

i get an error:
      *** unhandled exception in callback:
      ***   FATAL: invalid enum GtkArrowType value arrow-type, expecting: up /
GTK_ARROW_UP, down / GTK_ARROW_DOWN, left / GTK_ARROW_LEFT, right /
      GTK_ARROW_RIGHT at modules/bumblebee/gui.pm line 398.

?

gtk_arrow_set() maps to Gtk2::Arrow::set(), which overrides Glib::Object::set().

$ perldoc Gtk2::Arrow

         $arrow->set ($arrow_type, $shadow_type)

           * $arrow_type (Gtk2::ArrowType)
           * $shadow_type (Gtk2::ShadowType)

Because things like this are hard to avoid, the bindings offer
Glib::Object::set_property as an alias for set.

Either do

   # Glib::Object::set and Glib::Object::set_property are the same
   $me->set_property (arrow_type => 'right');

or

   # Gtk2::Arrow::set overrides Glib::Object::set
   $me->set ('right', $me->get ('shadow-type'));


I'd never noticed this before.  The last change to GtkArrow.xs was in march of
'04, and before that the last significant change was before gtk2-perl-xs was
in sourceforge cvs.


-- 
muppet <scott at asofyet dot org>




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