Re: can_activate_acce

On Fri, 22 Jul 2005, muppet wrote:

  $button->signal_connect (can_activate_accel => sub {
        # inhibit the accel by returning TRUE.
        # the signal uses the same boolean-handled-accumulator
        # as events; so returning TRUE from the handler should
        # cause $button->can_activate_accel(...) to return FALSE.
        # don't allow the accelerator to activate if we're typing
        # in the entry.
        return ($window->get_focus == $entry);

but no matter how i do that, even just using "sub {return TRUE}",
$button->can_activate_accel($id) returns TRUE.  Even tried with a small C
program, and am confused by the results.

I was under the impression that one should return FALSE to inhibit the
accelerator. (Although, there are several contradictory versions of the
documentation.) I tried both ways in Perl and neither worked, but it might
be worth trying FALSE in C?


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