NilgiriHouse.com - Useful shareware for programmers using Microsoft development tools. Dexter is a shareware Add-in providing automatic code completion for all Microsoft Development environments.

Dexter Frequently Asked Questions

Current Version: 1.0 (Build 14)

Q. Why did you create Dexter?

A. Automatic code completion is something most programmers will find useful. It certainly isn't a new idea, and has existed in one form or another for at least the last decade. For some reason, this useful feature has never been available natively within any of Microsoft's development environments. This is why we created Dexter - the first fully configurable automatic code completion Add-in available for all Microsoft IDEs.

Q. What technologies were used to implement Dexter?

A. Dexter is entirely written in C++, using Microsoft Foundation Classes (MFC) and Microsoft Active Template Library (ATL). Dexter is built using Microsoft Visual C++ 6.0 and Microsoft Visual C++ .NET 7.0.

Q. When Dexter attempts to automatically complete statements within Microsoft's Visual Basic IDE, compile error message boxes keep appearing. What can I do to prevent this happening?

A. You need to turn off auto syntax checking. This can be done by selecting Options... from the Tools menu. An options dialog will appear - uncheck the box labelled Auto Syntax Check on the Editor tab.

Q. Occasionally Dexter provides automatic code completion when I don't want it to. What can I do about this?

A. Firstly, Dexter knows nothing about the structure of the document - it simply monitors key strokes. The reason for this, is to allow Dexter to function within all Microsoft's development environments, not just Visual C++. If you write code sequentially, left to right, top to bottom, Dexter should always know when you are within a comment or a string, and therefore disable automatic code completion until the comment or the string is closed. However, if you click the mouse within a piece of code, or press <Home>,<End>, <Page Up>, <Page Down> or move the cursor using the arrow keys, Dexter 'forgets' your recent key strokes and therefore won't realise you are within a comment or string. In order to get the most benefit from Dexter, you need to appreciate this and press <Shift> and the completion key (space bar by default) together. This will stop automatic code completion occasionally occurring at these times. Use Ctrl + Z to undo the incorrect automatic code completion actions. If you select <Tab> or <Alt Gr> as your completion key, chances of incorrect automatic code completion occurring will be much reduced.

Q. Why does Dexter do absolutely nothing when I expect automatic code completion to occur? 

A. Either there's a bug in the software (surely not!) or the Dexter configurations you have defined are not enabled for your current environment. If you are using Microsoft Visual Studio .NET for example, check that you have an enabled configuration with "Microsoft Visual Studio .NET and VSA .NET" selected as its environment with file types matching the file types you will be editing. This can be done from within Dexter's configuration dialog as shown.

 

Another reason Dexter may not work, is because you are holding down the <Shift> key when pressing the completion key (space bar by default) after typing a keyword. Automatic code completion will NOT occur if  the shift key is depressed. When this happens you should see the following dialog

Q. How do I use Dexter variables?

A. The best way to describe how to use Dexter variables is with an example. Consider the following Dexter keyword definition for C#.

When editing a C# (.cs) file, if you type 'prop' and press the completion key (space bar by default), the following dialog will appear prompting you to enter values for the variables '%Property Type%', '%Hungarian%' and '%Property Name%'

If you enter 'int', 'i' and 'Age' in the edit boxes as shown and click <OK>, Dexter will automatically produce the following code (implementing a standard C# property).

public int m_iAge;
public int Age;
{
        get
        {
                return m_iAge;
        }
        set
        {
                m_iAge = value;
        }
}

When defining Dexter keywords, you may have up to 5 variables within the Replace With field. If you want the automatically completed code to contain a single '%' character, then use '%%' within the Replace With field.

Q. I am editing C# files using Microsoft Visual Studio 2002 or 2003. After automatic code completion has occurred, Dexter leaves the cursor one line above where it's supposed to be. How can I cure this problem?

A. It's likely you have the 'leave open braces on the same line as construct' option set (this option can be viewed and changed by selecting the Tools\Options... menu and visiting the Text Editor/C#/Formatting options section). If you prefer this option to be set, it is recommended that all your Dexter keywords also employ the 'leave open braces on the same line as construct' style. For example, an if keyword should be defined something like 'if ( @ ) {\n}' and not 'if ( @ )\n{\n}'. Notice the first '\n' has been removed to leave the opening brace on the same line as the if construct. 

Q. Why is there no automatic installation program for Dexter?

A. Installing Dexter is simple - create a directory, extract the  files to that directory, and then register one or more COM components using the RegisterDexter.cmd batch file provided (or using RegSvr32.exe if preferred). This shouldn't present any problems for Dexter's target audience (professional software developers) and serves to keep download file sizes to a minimum (122Kb or less).

Q. I can choose ALT GR as the completion key, but what is ALT GR?

A. The ALT key on the right hand side of UK Keyboards is labelled with ALT GR (alternative graphics), and behaves slightly differently than on most non UK keyboards (including US). If you do not have a UK keyboard, and wish to use the right hand ALT key for Dexter's completion key, you will have to do the following to get it to work. In control panel, select Regional and Language Options. On the dialog that is displayed, visit the Languages tab and press <Details...> button. On the Text Services and Input Languages dialog that is displayed click the <Add...> button. Within the Add Input Language dialog, select whatever input languages you currently use (e.g. English (United States) and then change the Keyboard layout/IME option to United Kingdom and press <OK>. When you use this new setting, you will be able to use the right hand ALT key for Dexter's completion character on a non UK keyboard. Please note, the above instructions are correct for Microsoft Windows XP operating system.

Q. I am using Microsoft Visual Studio 2002 or 2003. Automatic code completion is working correctly, however Dexter's menu item (Configure Dexter...) has disappeared from the Tools... menu. What can I do to restore it?

A. Shutdown all instances of Microsoft Visual Studio .NET and run UnRegisterDexter.cmd followed by RegisterDexter.cmd (these files are provided with Dexter). When you restart Visual Studio, the missing menu item will have been restored.

Q. Automatic code completion is not behaving correctly and the resulting code has extra or missing characters. What can I do to fix this problem?

A. The most likely cause of this problem is that your host IDE tab options are different than the ones the active Dexter configuration has. Edit the active Dexter configuration making its host IDE tab settings the same as the ones being used by the host IDE. To see what tab options the host IDE has, select the Tools\Options... menu. For Visual Basic and Visual Basic for Applications version 5 and 6, you'll need to select the insert spaces option in the Dexter configuration.

Q. I have installed Visual Studio .NET 2003 and Visual Studio .NET 2005 (and not Visual Studio .NET 7.0). When I run RegisterDexter.cmd, I see the following message box:

How do I resolve this error?

A. Dexter is built using Visual Studio .NET 7.0, and requires 2 Microsoft DLLs (mfc70.dll and msvcr70.dll) which may not be installed on your system. You can verify these DLLs are missing by opening the file DexterVSAddIn.dll in the Dependency Walker (Depends.exe, available here). You will see something similar to the following screenshot:

If you don't have these DLLs, they are available from Microsoft or from here.

Q. I am running Visual Studio 2005, and Dexter's automatic code completion does not work correctly for certain languages (e.g. C#, J#, Visual Basic). Why is this?

A. Within Visual Studio 2005, Dexter only supports correct automatic code completion for C++. For all other languages, please use Microsoft Visual Studio 2005's native support for code snippets.

horizontal rule

Home

Last Modified: 26/09/2006

Copyright 2006 NilgiriHouse.com