Re: radioitem



muppet wrote:
..
you're interested. Therefore it looks like the same event fires twice, but really it's two different events that make up the same action; the
                   ^^^^^^^^^^^^^^^^^^
That's the reasons, thanks.

That is, you're ignoring all arguments and proxying the event to a method on your object, which is trapped in the closure (without seeing the rest of the code, i don't know whether that's a global or lexical or whatever).

I use this and it works.

callback => sub{ $self->radio_callback($self->{menu}->get_widget('/Radio/Radio One'), "one" ) }

And as vincent suggestion:

sub radio_callback {
   my ($self, $widget, $which) = @_;
   ...
}

Thanks all.

--

--beast




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