Re: radioitem



"vila" == Vincent LADEUIL <v ladeuil alplog fr> writes:

Ooops, I hate following up to myself, but...

"Beast" == Beast  <beast i6x org> writes:
    Beast> muppet wrote:
    >>> probably belongs in the FAQ:
    >>> http://mail.gnome.org/archives/gtk-perl-list/2003-September/msg00081.html
    >>> http://mail.gnome.org/archives/gtk-perl-list/2004-April/msg00115.html
    >>> http://mail.gnome.org/archives/gtk-perl-list/2005-March/msg00039.html

    Beast> Thanks, but I still have a problem. It trigger action
    Beast> twice on every event, what could be the reason?

    Beast> use Gtk2::SimpleMenu;

    Beast> ...  children => [ 'Radio One' =>  { callback => sub { $self->radio_callback(@_)},

We need the widget of course...

    vila> sub radio_callback 
    vila> { my ($self,$widget) = @_;

to use it here

    vila> if ($widget->get_active()) 

and here.

Sorry,

    Vincent



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