in reply to Re^2: Detect perl/Tk Button double-clicks vs. single-clicks
in thread Detect perl/Tk Button double-clicks vs. single-clicks

It isn't considered a bug.

A double click is a single distinct user action, and the expected behavior would be for it to trigger a single distinct event. The fact that it triggers a series of two events, one of them also associated with a different action, is not logical, useful or documented. Whether or not you think it's a bug, it most certainly is a problem. Again, ++ to liverpole for coming up with a solution.

  • Comment on Re^3: Detect perl/Tk Button double-clicks vs. single-clicks

Replies are listed 'Best First'.
Re^4: Detect perl/Tk Button double-clicks vs. single-clicks
by Anonymous Monk on Jul 26, 2009 at 17:35 UTC
    A double click is a single distinct user action

    That is debatable.

    and the expected behavior would be for it to trigger a single distinct event.

    You may expect that, but Tk developers didn't. Many other GUI toolkits (Microsoft MFC, Java AWT, wxWidgets) propagate events the same way.

    The fact that it triggers a series of two events, one of them also associated with a different action, is not logical, useful or documented.

    Its documented in Tk::bind, bind: Binding to a single mouse click. The docs also say that Tk doesn't build that functionality in, partly because it's not what people actually want in most cases. So if Tk developers don't consider it a bug, well, there you go :)