#1271 Executing command while one is already running

SciTE (626)

When SciTE executes a command then it disables most of the menu items for executing another commands. There are however some problems:

1. Help commands (which can execute command as well) are not disabled.
2. Keyboard shortcuts for user defined commands (e.g. Ctrl+9) still work.


  • Jakub Vrána

    Jakub Vrána - 2011-12-29
    • assigned_to: nobody --> nyamatongwe
    • milestone: --> Bug
  • Neil Hodgson

    Neil Hodgson - 2012-01-02

    Wouldn't the check be better located in the command implementations (ToolsMenu, IDM_HELP, ...) where it will work on all platforms? It also avoids menu iteration which is failure-prone - for example, this won't work if the tools are moved to a sub-menu. This isn't something I'd do but some downstreams like extra levels of menus.

    The disabling is fine.

  • Jakub Vrána

    Jakub Vrána - 2012-01-05

    Yes, it was my original idea. The problem is that I don't know how to find out if the menu item is disabled in the command implementation. I don't want to duplicate the menu-disabling logic there.

    Can you please advice me?

  • Neil Hodgson

    Neil Hodgson - 2012-01-06

    There are already checks for command validity performed in the command implementations so adding a check for already running isn't so bad. I'd rather reproduce the checks than have platform differences.

    Menu APIs differ greatly in behaviour and performance between platforms - GTK+ and OS X now have maps from ID to menu item to avoid some of the costs. Asking the menu item for its enabled state seems potentially flakey as it would be valid to optimize this to only be updated when the menu is shown.

    Another approach would be to have a method that could determine whether a command ID is currently valid that could be used both from the menu enabling code and from command execution code.

  • Neil Hodgson

    Neil Hodgson - 2013-06-12

    Keyboard access to tool command case fixed for [#1486].



    Bugs: #1486

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.

No, thanks