in

The ORM Foundation

Get the facts!

Reverse Role Order (menu item)

Last post 03-27-2009 13:22 by Matthew Curland. 3 replies.
Page 1 of 1 (4 items)
Sort Posts: Previous Next
  • 03-25-2009 12:31

    Reverse Role Order (menu item)

    I find that the most frequent 'Orientation' command that I use (Reverse Role Order) is last on the pop-up menu.  While truely a minor suggestion, I would prefer this command to be at the top of the menu, rather than the bottom.

    Thanks,

    Jim

    Jim Ludden
    Filed under: ,
  • 03-25-2009 14:00 In reply to

    Re: Reverse Role Order (menu item)

    Noted, and I think I agree with you (the other orientation items are also available in the Properties Window, but not this one).

    Also note that all of the context menu items have accelerator keys. This command is 'ov'. You can see the accelerators by opening the context menu with the context menu key on the keyboard (usually between the right alt and ctrl keys).

    The same result can be achieved with 'Swap Role Order' when a role is selected, so you don't need the submenu. I did notice a problem here, though, namely that the 'w' accelerator is listed twice. 'Swap Role Order' is just a dynamic rename of the 'Move Role Left' and 'Move Role Right' commands (I didn't see the accelerator because it is in a resource file instead of the menu file).

    -Matt

  • 03-27-2009 11:57 In reply to

    Re: Reverse Role Order (menu item)

    Thanks Matt.

    You have mentioned accelerator keys previously, but I've never found them. Now that you mention them, I still get no response from NORMA when I select a binary fact type and press 'ov' or <Alt>ov. Thanks, too, for letting me in on that strange new key that - now that you mention it - does look like a menu. Of course I always called these things 'keyboard shortcuts', but I can probably learn 'accelerator', too. Wink

    I also wondered why we sometimes 'swap role order' and other times 'reverse role order'.

    Jim Ludden
  • 03-27-2009 13:22 In reply to

    Re: Reverse Role Order (menu item)

    The keys only work after you open the context menu. Alt-o-v won't do anything.

    The 'Reverse Role Order' command reverses the role order for all fact type arities, not just binaries, so 'swap role order' wasn't correct for this command. The 'swap role order' text appears only for binaries (otherwise, you 'll see 'move role left' or 'move role right'). Given that 'reverse role order' notion is equivalent to 'swap role order' for binaries, but 'swap role order' is not equivalent to 'reverse role order', I wouldn't mind renaming this.

    The issue then is that we have two 'reverse role order' commands (one for the FactType shape, one for the role selection), which seems a little odd. Alternately, I could just leave the 'move role left' and 'move role right' text alone instead of changing it for binary fact types. I think most users realize that moving the right role left/left role right swaps the roles and reverses the role order. [This way, I also wouldn't lose track of the accelerator key by putting command text in a resource file separate from the command file.]

    The term 'shortcut keys' is generally associated with a single keystroke (generally modified with some combination of Ctrl/Alt/Shift) that can be used to invoke a commands without using menus. Accelerators are single characters used to navigate through menus. For example, 'Ctrl-S' is the shortcut key for save, and 'alt-f-s' provides the standard accelerator sequence for the same command.

    In VS, you can customize your shortcut keys for any command.

    1. Right-click anywhere on a blank space in the toolbars and choose the 'Customize...' option.
    2. Click the 'Keyboard' button at the bottom of the dialog. (Note that you can also get here with Tools/Options.../Environment/Keyboard
    3. Type 'reverse' in the the 'Show commands containing' field.
    4. You'll see 'OtherContextMenus.ORMDesignerContextMenu.Orientation.ReverseRoleOrder'. Select it.
    5. In the 'Use new shortcut in' dropdown, choose 'ORM Designer'
    6. Click in the 'Press shortcut keys' field
    7. Hold the Alt key down and type in OV. The field will say 'Alt+O, Alt+V'
    8. Click the 'Assign' button (important, or you get nothing).
    9. Click OK to close the dialog.

    You can now run the Orientation/Reverse Role Order command when a FactType is selected with Alt-OV. Note that it is pretty unusuall to use Alt on its own as the modifier for a shortcut key because it interferes with the menuing system for a lot of characters (FEVTWH are pretty much off limits), so you generally use something like Alt-Shift instead of just alt.

    -Matt

Page 1 of 1 (4 items)
© 2008-2014 The ORM Foundation: A UK not-for-profit organisation -------------- Terms of Service