Re: Signal disconnecting



On Sat, 2003-08-16 at 16:24, Fred. Oger wrote:
My problem I would like to reassign the function called when a button is
hit a second time, so then disconnect would be done in the callback
function to which I can't pass the $handler_id.
That's the reason I was looking for the disconnect_by_func.

I'll try to find another solution.

that should be easy enough to get around, sorry if i'm stating the
obvious:

my $yet = 1;
$widget->signal_conect( clicked => sub{
        if( $first )
        {
                # first time stuff
                $first = 0;
        }
        else
        {
                # every other time
        }
} );

-rm




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