|
Basic Documentation
Function Descriptions
If you want to add a custom description to a function which appears in infopop tooltips and the explorer toolbox, you can do so by adding "special comments" above your function declaration. They must be directly adjacent to your function declaration. They may span multiple lines. Each line entry will be on a separate line when the infopop is displayed:
/// Initializes the debugger /// and does other random stuff function InitDebugger() {
[...]
}
Note that the comment regions start with "///", and not "//". The default syntax highlighting schema colors special comments dark gray.
Code Regions
Codeweaver supports collapsable code regions similar to Visual Studio. If you would like to create an auto-collapsed, labelled code region, place the code you wish to collapse between the following blocks:
//__region My Region
[...]
//__end
Where "My Region" can be any label you want, or nothing at all.
Interactive Debugging
If you wish to use Codeweaver for interactive debugging, you must merge the Enhanced TelnetDebugger by Tom Spilman into your Torque engine codebase. Not doing so will cause the debugging feature to act unpredictably and is not recommended.
To enable debugging, right-click on the project name in the project explorer and select properties. Fill out the dialog, correctly populating all the necessary debug fields, and then set "Enable Debugging" to "True". Once set, the Debug menu should become available and you may now debug your project.
Variable-Level Auto-Completion
If you wish to fully utilize variable-level completion, you must declare the type of your variables. In local scope, you may do so like below:
//# DECLARE %variable AS objectType
Where "objectType" is the type of object you wish to make "%variable". From this point forward, in local scope, you may use %variable. to perform object-level auto-completion.
Declared Object Auto-Completion
Any objects declared using the new ObjectType(ObjectName) method are automatically declared and can be dereferenced by using the scope resolution operator (::) or the object member operator (.).
Infopop
Infopop tooltips are automatically displayed when you type a parenthese after a built-in or user-defined function. You may also press Ctrl+Shift+Space to accomplish the same task so long as you are within the parenthese boundaries of the function call. Newly-defined functions will be added to the global token listing upon saving the file.
F4 Object Browser
You can browse all imported objects by pressing the F4 key at any time in the editor. You can scroll through the prompt using the up and down arrows. You can enter a class and browse its functions by pressing Tab or the right arrow key. In the function listing, you can jump back to the class listing by pressing the left arrow key. Pressing enter will paste the class or function name into the editor. If the cursor is directly adjacent to or directly on top of a local or global variable when F4 is pressed, pressing enter on a class in the list will automatically generate a //# DECLARE entry on the line above the variable. This can help make declaring variables quick, easy, and efficient.
For a more complete feature listing and documentation, please refer to the Codeweaver website. As always, your donations are appreciated and help keep this software free.
|