AxAssist

Main Features Downloads Purchase Forum Support  

Features

Contents
  1. All contents

  2. 1. Dynamics AX AOT
  3. 2. Dynamics AX Editor
    1. 2.1. Suggestions
      1. 2.1.1. Variable list
      2. 2.1.2. Variable names list
      3. 2.1.3. Name Matching
      4. 2.1.4. Acronyms
      5. 2.1.5. User list
    2. 2.2 Browsing and navigation code
  4. 3. Hotkeys
  5. 4. Settings
  6. 5. Code reformatter
  7. 6. How to...
    1. 6.1. How to add new button on toolbar
    2. 6.2. How to add new hotkey
    3. 6.3. How to use your text as suggestion
      1. 6.3.1. In User list
      2. 6.3.2. In Acronyms list
    4. 6.4. How to customize tooltips
    5. 6.5. How to set up the auxiliary panel (HelpPane) in Dynamics AX Editor
    6. 6.6. How to start AxAssist after Dynamics AX startup
How to


How to add new hotkey

As a sample let's add processing script “addVariableDefinition” for the 5th AxAssist's Editor hotkey.

Sequence of operations is the following:

1. Create processing method. To do so, create method static void addVariableDefinition(Editor e) in DEV_AxAssistFunc class (it is already exist in supplied default DEV_AxAssistFunc class)
2. Add following code to method void editorHotkey( int nHotkey, Editor e) in DEV_AxAssistHotkeys class (use static void globalHotkey( int nHotkey) for global hotkeys):
……

switch (nHotkey)
{
  case #editorBaseId:
    editor.comments_comment(e);
    break ;
  case #editorBaseId + 1:
    editor.comments_uncomment(e);
    break;
  case #editorBaseId + 2:
//open current element in AOT
    DEV_AxAssistFunc::OnOpenInAOT(varTypeName, varTypeType);
    break ;
  case #editorBaseId + 3:
    DEV_AxAssistFunc::activateReFormatter(formActiveXControl);
    break ;
//--new code--->
  case #editorBaseId + 4:
    DEV_AxAssistFunc::addVariableDefinition(e);
//<--new code---
  default :
    break;
}
……

4. Compile classes DEV_AxAssistFunc and DEV_AxAssistHotkeys.
5. Assign 5th AxAssist Editor hotkey (you can do this within “Editor hotkeys” tab in the AxAssist's “Settings” dialog).

Result:



© 2007 - 2008 - axassist.com