Copyright: ®1996 NuMega Technologies, Inc.


Contents

Please choose a help topic from the list below.

 	Step-by-Step guide to using NuMega CodeReview

  	How to obtain support

 	Technical summary

 	Quick-Start on NuMega CodeReview

Contents

10


Support
Support Services

 This section provides instructions on support services available from NuMega Technologies, Inc.

In order to save your time and provide you with the best possible support, we would like you to do a few things before you contact us. These simple steps will get you the fastest answer to your questions.

•	Have you read the manual? Did you look under the table of contents and the index? Did you re-check the manual?

•	Have you used the search feature of the help system?

•	Have your serial number ready. It was on the registration card stuck on the inside cover of the manual.

•	Have your version number ready. Select About from the Help menu in any window to see the version number.

 By Phone

Technical support is available from 9:00am to 5:00pm, Monday through Friday, EST. The technical support phone numbers are 603-889-2386 and (toll-free) 1-888-NUMEGAS. Have version number, customer number and product serial number ready.

 By Fax

You can fax your questions to (603) 889-1135 24 hours a day. Don’t forget to include version and registration numbers. Provide as much detail as possible in your fax.

 By E-Mail We also provide tech support via electronic mail. Send e-mail to internet info@numega.com. Don’t forget to include version and registration numbers. Include any code examples as a file attachment to the email. You can also visit our web site at http://www.numega.com.

Support

10002


Event Class

The Event Class places the event into one of six standard categories of code problems/usability issues. The Event Class appears in both the summary and detailed explanations for an event. You can optionally use the Event Class as a filtering mechanism to run reviews that focus on selected problems/usability issues.

CodeReview defines these event classes:

•	Logic errors cover issues such as poor coding and known bugs.

•	Portability issues cover conditions that limit a project to specific versions of Visual Basic or Windows.

•	Performance covers issues that relate to performance. For example, methods to minimize size and increase speed fall under this class.

•	Windows API covers known Windows API bugs.

•	 Standards Compliance covers issues relating to defined standards. For example, standard control naming schemes, menu naming, form and module naming.

•	Usability covers issues that relate to interaction with the user of the application under review. For example menu, screen, mouse, keyboard and hotkeys fall under this class.

Use the Report Types option on the View menu to select the Event Classes you want to include in a review.

Event Class

50


Event

An event is any Visual Basic construct (code, form, class, etc.) contained in CodeReview's knowledge base. As the selected project files are processed, any matches between code and the rules in the knowledge base generate an event.

Event Classes

Event

12040


File Menu

Use File menu commands to open projects; to save, export and print review results; and to exit CodeReview.

Use:

•	Open to open the Visual Basic project you want to review.

•	Close to close the currently loaded project.

•	Save to save current review results.

•	Export to export review results to a plain text file.

•	Print to print review results.

•	[File List] to open files you have worked with previously. (As you use the program, project names are added to this list, and it provides a convenient way to re-open project files.)

•	Exit to exit CodeReview.


Edit Menu

Use Edit menu commands to perform standard text search and copy functions, and to perform actions in the Message Manager window.

Use:

•	 Copy to copy selected text from CodeReview window into the Windows clipboard. (This command is provided for your convenience, in case you want to copy a selected piece CodeReview information to include in a memo, or some other document.)

•	Find, Find Next... to search for specified text in any CodeReview window.

•	Add Message to add an event definition to CodeReview's knowledge base. This command is only available from the Message Manager window.

•	Delete Message to delete the currently selected event in the Message Manager window. This command is only available from the Message Manager window, and applies to the currently selected message in the window.

•	Message Properties... to display and edit the event definition for a selected message in the Message Manager window. This command is only available from the Message Manager window, and applies to the currently selected message in the window.


View Menu

Use View menu commands to control the focus of a review, before running it, and to display various types of results and descriptive information, after running the review.

Use:

•	Review to open the Results window

•	Explanation, after a review is complete, to view a detailed description of any event listed in the Results window. First click on the one-line description of the event in the Results window, then choose Explanation from the View menu, to have CodeReview display a detailed description in a separate window.

•	Source Code to view the source code of the current project.

•	File Selections, before running a review, to choose which files to include in the review.

•	Report Types, before running a review, to choose which event classes to include in the review

•	Report Levels, before running a review, to choose which level of severity (i.e., Notification Types) to include in the review.

•	Knowledge Base Article to view a Microsoft Knowledge Base article related to the current event. This command is only active when you have an active Internet connection and are viewing an event description that includes a link to an article in Microsoft's Knowledge Base.

•	Visual Basic Item Help to view a Visual Basic help topic related to the current event. This command is active when you view an event description that includes a link to a topic in the Visual Basic Help file.

View Menu

60


Run Menu

Use Run menu commands to start, stop, and control the processing of, reviews.

Use:

•	Start to review the currently loaded project. Before selecting Start, be sure you have selected the Report Types and Report Levels (under the View menu) that you want CodeReview to include in the review. By default, all Report Types and Report Levels are included.

•	Break to stop the review. Note that choosing Break ends, rather than pausing, a review. You can run a new review, but cannot resume the previous one from where you left off.

•	Next Event to have CodeReview proceed to the next event in its review. Next Event is only active when you are running in interactive mode and are currently paused at an event during the review process.

•	Interactive Mode to switch between interactive and batch modes, before starting a review.


Tools Menu

Use Tools menu commands to configure the CodeReview environment and to open the Message Manager.

Use:

•	Message Manager... to review and edit the contents of CodeReview's knowledge base, through the Message Manager window.

•	Options... to review and edit settings that configure the CodeReview environment.


Report Types

Use Report Types on the  View menu to choose which event classes to include in upcoming reviews. Click on any item in the  Report Types list to reverse its current selection state. Choose:

•	Invert Event Selection to reverse the current selection state of all event classes in the Report Types list.

•	View All Events to select all event classes for inclusion in upcoming reviews.

•	Logic errors to have the review address issues such as poor coding and known bugs.

•	Portability issues to have the review address conditions that limit a project to specific versions of Visual Basic or Windows.

•	Performance to have the review address issues that relate to performance. For example, methods to minimize size and increase speed fall under this class.

•	Windows API to have the review address known Windows API bugs.

•	 Standards Compliance to have the review address issues relating to defined standards. For example, standard control naming schemes, menu naming, form and module naming.

•	Usability to have the review address issues that relate to interaction with the user of the application under review. For example menu, screen, mouse, keyboard and hotkeys fall under this class.


Report Levels

Use Report Levels on the  View menu to choose which Notification Types to include in upcoming reviews. You can select, or de-select any of the four available types: Warnings, Cautions, Alerts and Notices. Click on any item in the  Report Types list to reverse its current selection state.

As used by CodeReview in its event definitions, the Warnings Notification Type is assigned to events that represent  severe conditions in code, Cautions and Alerts are used for progressively less critical conditions in code and the Notices Notification Type is assigned to events that represent the least problematic conditions in code. (For example, a Notice may inform you of some aspect of your code that represents unconventional style usage, but probably does not have an impact on program integrity or performance.) When defining your own events, it is recommended that you assign Notification Types in a way that is consistent with CodeReview's use.


Notification Type

The Notification Type assigns a severity level to an event, and can be used as a filtering mechanism, to limit reviews to events with given severity levels.


Guide
Step-by-Step Guide

 This topic provides a summary of steps for using CodeReview.

To load a project and run a review:

1. Choose Open from the File menu to select and load a project.

2. Choose the files you want to process from the file list in the Project Window.

3. Decide which event classes to include in the review review using Report Types on the View menu.

4. Decide which notification types to include in the review using Report Levels on the View menu.

4. Start the review, by choosing Start from the Run menu.

You can run the Wizard at any time.

Guide

10003


Technical Summary

 This topic provides a brief technical description of how NuMega CodeReview operates.

CodeReview scans projects for many conditions. The CodeReview knowledge base comprises over 2 megabytes of known bugs, performance issues, and other problems. Each file is read line-by-line, and each line is reviewed for a match with any conditions in CodeReview's knowledge base.

CodeReview NameBase

CodeReview also scans the selected files for any non-standard naming. CodeReview uses the NameBase, which is shared by other utilities as well. The NameBase consists of the files CLASSNAM.NDX and CLASSNAM.DBF. CLASSNAM.NDX contains all known Visual Basic object class names. CLASSNAM.DBF contains the actual prefixes to use. These two files work together to provide a consistant, manageable database of class names and standard prefixes.  The NameBase is stored in dBASE III+ file format, not as MS Jet. The database engine used is Visual/db, also from NuMega Technologies, Inc. Visual/db can index over 200 records per-second, offers memory based (buffered) file storage, and runs in the applications process making it many, many times faster than equivalent Jet calls. Also, Visual/db only requires about 75K of overhead vs several megabytes for MS Jet.

Technical_Reference

10004


quick start
Quick-Start

 This topic describes the CodeReview wizard.

You can use CodeReview's wizard to quickly complete a review. The tabbed steps on the wizard dialog will guide you through loading a project, selecting which files to review, choosing processing options, and running the review.

CodeReview will not overwrite, change or modify your project, its files or any aspect of the project. CodeReview simply reads your project files and then displays events in the Results Window.

quick start

4000


How It Works

CodeReview works by scanning your project's files for conditions defined in its knowledge base.  When CodeReview finds conditions in your code that match conditions defined in its knowledge base, it generates an event and prints a description of the event to the Results Window.

How It Works

10006


NameBase
CodeReview's NameBase

The CodeReview NameBase consists of several files that contain all known object class names, and a standard prefix which is used to classify each object class.

NameBase

12026


CodeReview Knowledge Base
CodeReview's Knowledge Base

The CodeReview knowledge base consists of several file that contain conditions, keyword combinations, usage, event and other information used to detect events.

Knowledge Base

10007


Tips Of the Day
Tip Of the Day

The Tip Of the Day feature provides pointers to maximize your usage of CodeReview.

•	You can disable tips by clearing the Show Tips At Startup option. You can see tips from most Help menus.

•	Choose OK when done viewing tips.

•	You can cycle through the tips one at a time by choosing the Next Tip button.

•	The All Tips button shows this help file, which lists all tips.

More Tips

Tips Of the Day

2000


More Tips Of the Day
Tip Of the Day

Following is a list of all tips.

•	CodeReview uses VB/Namer NameBase(tm) to verify object naming compliance. Edit this file in VB/Namer for custom names.

•	You can skip running the Wizard each time you start CodeReview by clearing the 'Show Wizard At Startup' box on the Wizard screen.

•	FailSafe (also from NuMega Technologies, Inc.) can trap run-time errors, making your program crash-proof.

•	You can skip seeing Tip of the Day each time you start CodeReview by clearing the 'Show Wizard At Startup' box on the Tip of the Day screen.

•	CodeReview is OLE-enabled. You can control its functions from another program using OLE. See the help system for details.

•	You can enable or disable messages using the Message Editor.

•	You can edit alert message formatting using 'Message Properties' on the Message Manager menu.

•	You can edit alert message text by using the 'Message Properties' on the Message Manager menu.

•	You can filter which events to see using the Report Types and Report Levels options on the 'View' menu.

•	In batch mode, CodeReview processes all files without pausing. Use it to generate a to-do list.

•	In interactive mode, CodeReview pauses on each event. Use it to step-trace through a project.

•	You can run reports for any event category. Simply choose the events to include using the View menu.

•	You can change the error severity using 'Message Properties' on the Message Manager menu.

•	Color coding is user definable using 'Message Properties' on the Message Manager menu.

•	You can change the default extention used in file dialogs by editing VBFORMAT.INI, Prefs section, DefaultExt entry.

•	You can get context sensitive help almost anywhere by pressing F1.

•	System Information is available under About on the Help menu.

•	You can determine version and other important information from the System Information available under About on the Help menu.

•	You can save system information to a disk file by choosing Save from the File menu when the System Information is displayed.

•	You can set up the printer using the Setup command under Print on the File menu.

•	You can change the page orientation using the Setup command under Print on the File menu.

•	You can change the font used for printing using the Setup command under Print on the File menu.

•	You can exit the Tip Of The Day dialog by pressing Escape!

More Tips Of the Day

2001


Wizard Tab 1
CodeReview Wizard - Tab Step 1

Under Step 1, choose the project to process.

Step-By-Step Instructions

Technical Reference

Wizard Tab 1

3000


Wizard, Choose File
Wizard - File List

Choose a project from the list, or type the name of the file to process.

Wizard, Choose File

12027


Wizard, Finish
Wizard - Finish Button

Choose this button to start the processing using the information entered into the Wizard.

Wizard, Finish

12028


wiz_help
Wizard - Help Button

Choose this button to show help on using the Wizard.

wiz_help

12029


Wiz_last
Wizard - Last Button

Choose this button to move to the previous or last step in the Wizard process.

Wiz_last

12030


wiz_next
Wizard - Next Button

Choose this button to move to the next step in the Wizard process.

wiz_next

12031


wiz_our_developer
Application Splash Screen

This is the name of the application using the wizard.

wiz_our_developer

12032


wiz_show_at_startup
Wizard - Show At Startup Option

When this checkbox is set (has an X in it) then the Wizard appears automatically when the program starts. When the checkbox is cleared, the Wizard does not appear automatically.

   You can always run the Wizard at almost any point during CodeReview use by choosing NuMega CodeReview Wizard from the Help menu.

wiz_show_at_startup

12033


wiz_tab1
Wizard - Tab Step 1

Click here to move to Tab Step 1.

wiz_tab1

12034


wiz_tab2
Wizard - Tab Step 2

Click here to move to Tab Step 2.

wiz_tab2

12035


wiz_options
Wizard - Options

Choose this button to set program preferences and options for this review.

wiz_options

13007


wiz_browse
Wizard - Browse

Choose this button to select a project file to process.

wiz_browse

13006


wiz_tab3
Wizard - Tab Step 3

Click here to move to Tab Step 3.

wiz_tab3

12036


Wizard Tab 2
CodeReview Wizard - Tab Step 2

Under Step 2, choose which of the project files you want to process.

Step-By-Step Instructions

Technical Reference

Wizard Tab 2

3001


wiz_select_files
Wizard - Choose Files To Review

Choose the files in the list you want to include in the review.

wiz_select_files

12037


Wizard Tab 3
CodeReview Wizard - Tab Step 3

Under step 3, choose how to process the selected files.

Step-By-Step Instructions

Technical Reference

Wizard Tab 3

3002


WizMsg1
Wizard Message

You need to choose a Visual Basic project to review before CodeReview can review it. There is no project specified under Tab 1 of the Wizard. Move to Tab 1 and choose a project.

Choose:

•	Yes to load a project file now.

•	No to return to the Wizard.

WizMsg1

3003


WizMsg2
Wizard Message

You chose not to load a project. Do you want to exit the Wizard at this time?

Choose:

•	Yes quit the Wizard now.

•	No to return to the Wizard.

WizMsg2

3004


opfn
Open File Dialog

You need to choose a file to open.

Choose:

•	OK after to load a file after selecting it.

•	Cancel to close this dialog without choosing a file.

•	Network to navigate to network drives.

opfn

5000


StartNow
Open Project

You have opened a project. Would you like to review this project now?

Choose:

•	Yes to start the project review now.

•	No to return to the Project level view of the project.

StartNow

6000


Message Manager

The Message Manager provides access to CodeReview's knowledge base. Using options in the Message Manager window, you can review and customize the contents of the knowledge base to reflect your organization's particular programming styles, standards and priorities. Specifically, you can:

•	Edit the messages associated with any event, as well as other identifying information, such as severity level, event class and  color coding settings.

•	Add your own event definitions to the knowledge base.

•	Enable and disable events to control which rules CodeReview applies to any given review.

•	Edit the rule defintions for selected CodeReview events. (This is generally not recommended.)

To work with event definitions

1	In the Message Manager Window, click on the one-line description of the event that you want to review or edit.

2	Click the right mouse button to display the Message Manager menu.

3	On the menu, choose the action you want to take. Use:

• 	Copy to copy the currently selected message to the Windows clipboard. (The Copy command is simply provided as a convenience, in case you want to save any event descriptions for inclusion in memos or other purposes.)

•	Find and Find Next to search for any event number, message text, or Enabled status value in the Message Manager window.

•	Add Message... to display the Message Properties dialog and enter a new event definition.

•	Delete Message to delete the currently  selected message (and associated event definition).

•	Message Properties.. to review and edit the event definition for the currently selected message.

Message Manager

5500


Message Properties

Use  Message Properties to review, edit and add CodeReview event definitions.

The Message Properties appear after you select either Add Message... or Message Properties... from the Message Manager menu.

Under Message Properties, use:

•	Configuration settings to describe and categorize the event.

•	Message settings to review and edit entries for Explanation, Impact, Repair and Notes text.

•	Rule settings to build new rules or modify existing ones.


Configuration Tab, Message Properties
Configuration Tab

Use Configuration settings under Message Properties to describe and categorize the event.

•	The Title is a one line description of the event. Title text appears in the Results window when CodeReview encounters this event during a review. It also appears in the Messages column of the Message Manager window. You can enter any line of text for the Title.

•	The Event Class categorizes the event and can be used as a filtering mechansim to include or exclude groups of event from reviews. Use the Event Class list to assign the event to one of the following categories: Logic, Portability, Performance, Windows API, Standards, Usability, or System. Use  Report Types on the View menu to include or exclude event classes from a review.

•	The Notification Type assigns a severity level to the event and can also be used as a filtering mechanism for project reviews. Use the Notification Type list to assign one of four notification severity levels to the event: Warning, Caution, Alert or Notice. Warning is generally used as the most severe notification level, and Notice as the least. Use  Report Types on the View menu to include or exclude events from a review, based on their Notification Type.

•	The Color Code specifies the text color CodeReview should use to display the summary description of the event that appears in the Results window during a review. Use the Color Code list to choose a color.

 Message Tab

Rule Tab

Message Manager Window


Message Tab, Message Properties
Message Tab

Use Message entries under Message Properties to specify Explanation, Impact, Repair and Notes text.

Each of these entries consists of multiple lines of text, describing a particular aspect of an event. CodeReview will display the Explanation, Impact, Repair and Notes text in the following instances:

•	 During an interactive review session, each time CodeReview encounters an event in code, it displays the associated Explanation, Impact, Repair  and Notes text in an Event window that appears above the Results window.

•	After a review is complete, when you double-click any one-line event description in the Results window, CodeReview displays a window with detailed information about the event, including the Explanation, Impact, Repair and Notes text.

You can include formatting codes in your entries for these items.

To format text in:

•	Bold, use:

\b1 to turn bolding on\b0 to turn bolding off

For example, here is a formatted line of text, and the resulting display:

An \b1 Option Explicit \b0 statementAn Option Explicit statement

•	Color, use:

\cfnn

where nn is a number from 1 to 15 that identifies a Visual Basic QBColor scheme value.

Configuration Tab

Rule Tab

Message Manager Window


Rule Tab, Message Properties
Rule Tab

Use Rule entries under Message Properties to specify a condition that CodeReview should locate in code.

Use the With entry and the elements in the If...Then statement on the Rule tab to build new rules or modify existing ones.

The "With" setting

CodeReview can limit a rule to apply only to projects created in a specific version of Visual Basic, or can apply a rule to all projects, regardless of the version of Visual Basic in which they are created.

Choose:

•	any project to apply the rule to all projects

•	VB5, VB4 or VB3 to apply the rule exclusively to one specified version of Visual Basic.

The If ... Then Statement

Use the three elements in the If...Then statement to build the rule.

First If...Then Element

The first element in the If...Then statement identifies the section of a project to which this rule applies. Choose:

•	 project file to have CodeReview search only in the .VBP, .MAK or .VBG file.

•	declaration section to have CodeReview search only in the file's general Declarations section.

•	any procedure to have CodeReview search each procedure.

•	any line of code to have CodeReview search each line of executable code.

Second If...Then Element

The second element in the If...Then statement tells CodeReview how to examine the specified section of the project. Choose:

•	contains to have CodeReview check for the presence of the specified condition.

•	doesn't contain to have CodeReview check for the absence of the specified condition.

•	equals to have CodeReview check for lines of code that exactly match the specified condition.

Third If...Then Element

The third element in the If...Then statement specifies the condition for which CodeReview should look. Use the following guidelines to create a valid entry. Your entry:

•	Can consist of any valid Visual Basic keywords. For example, all the following are valid entries:

Option ExplicitOn Error Resume NextDebug.Print

•	Can include any of CodeReview's Rule macros, used in conjunction with Visual Basic keywords. See Rule Macros for details.

•	Cannot include user data, unless this data is part of a search string specified using CodeReview's @INSTR macro command. See the manual for details.

Raise Event

CodeReview automatically assigns a unique number to each event you define.

Configuration Tab

Message Tab

Message Manager Window


Rule Macros

When entering definitions under the Rule tab of the Message Properties dialog, you can use  any of following macro commands, in conjunction with valid Visual Basic keywords:

•	@OR allows you to enter multiple conditions. Note that @OR must be preceded and followed by a space. Here is a sample use:

On error @OR On Local Error

This rule checks for instances of either "On Error" or "On Local Error".

•	@ANYFORM is a placeholder element that represents every form in the project. A rule containing @ANYFORM serves as a template, from which CodeReview builds specific instances of the rule for every form. For example, if you enter:

@ANYFORM.HIDE

CodeReview checks for use of the HIDE method in every form in a project.

•	{classname} is used to build a rule that applies to all objects of a specified Visual Basic class. In place of "classname", enter any valid Visual Basic class name within the curly brackets. For example, to check for uses of the SetFocus method in any text box in a project, enter the text box class name, VB.TextBox, followed by the SetFocus method, i.e.:

{VB.TextBox}.SetFocus

•	The question mark, ?, is a wildcard character, representing any number of characters and spaces. The question mark character must be preceded and followed by a space for CodeReview to recognize it as a wildcard character. Use "?" when building a rule to find lines of code with variable contents. For example, if you enter:

Open ? For Input

CodeReview finds lines of code that contain the keyword "Open" followed anywhere in the line by "Input".

•	@INSTR (searchstring) allows you to search for exact matches to any string of characters that you specify. Use @INSTR when you want to search for user data as well as Visual Basic keywords. For example, to search for any instances of the string cmdCommand1.Caption="Press Me", you would enter:

@INSTR (cmdCommand1.Caption="Press Me")

Rule Tab

Configuration Tab

Message Tab

Message Properties

Message Manager Window


Event Window

When you run a review in interactive mode, CodeReview displays a detailed description of each event it encounters in an Event window, which appears above the Results window.

The Event window includes these items:

•	 Event location identifies the project file, module, procedure and line number of the code that generated the event.

•	Event Code displays the line of source code that generated the event.

•	The text under Category describes the category of event that occurred.

•	The text under Explanation provides a general description of the event.

•	The text under Impact describes the potential effect of the event on your program.

•	The text under Repair suggests ways to correct the condition that triggered the event.

Use the commands at the bottom of the Event window to control processing and to display additional information:

•	Next Event causes CodeReview to resume processing until it encounters the next event.

•	View Article provides a link from selected event descriptions to relevant articles in Microsoft's knowledge base on its Web site. The View Article command is only active if you have Microsoft's Internet Explorer on your system, and you have a currently active Internet connection, and the current event contains a link to Microsoft's knowledge base.

•	View Help provides a link from selected event descriptions to relevant Visual Basic help topics.

•	Suppress... displays a dialog which allows you to suppress reporting of this event for the duration of the current procedure, module or project.

events

5600


Results Window

The Results Window displays events as they occur during a review. When the review is complete, you can read through a summary of all events that occurred during the review. To see a detailed explanation of any  event, double-click on its one line description in the Results window. To view the line of code that generated the event double-click on the one-line event description or click once on the description, then choose Source Code from the View menu. To print review results choose Print from the File menu. To save the review, or load a previously saved review, use the Save and Open options on the File menu.

review

5700


Expanded Display Window

This window shows you more information on the event under review. You can display this level of detail for any event, by double-clicking on its one-line description in the Results window.

note

5800


Source Code Window

This windows displays the source code that generated the selected event. You can view the source code that generated an event, by clicking on its one-line description in the Results window, then pressing Shift-F4, or selecting Source Code from the View menu.

mod

5900


Project Window

This window lists the project files for the loaded project. From this window you can invoke the Message Manager dialog, start and stop reviews or load new projects for review. To start a review, load a project and then press F5. To stop a running review, press Shift+F5.

Project

5400


Query Cancel Get Object Name

When prompted with the Get Object Name dialog, you chose to cancel.

•	To exit process press Yes.

•	Tto continue processing using the default object name press No.

•	To cancel this process, and stop processing, press Cancel.

Query Cancel Get Object Name

12000


Object Naming
Enter Object Name

While scanning a form for object names, an object was found without the standard naming prefix for objects of the Classname shown. The dialog shows the file name containing the object, the object classname, the current object's name, from the .Name property. Presented as a default new object name is the standard naming prefix for this object class and a name created from the caption property of the object.

Object Naming

10005


File Not Found

The file your tried to open could not be opened for some reason.

•	Check network connections and try again.

•	Long filenames are not supported under Windows 3.x.


OLE Interface

CodeReview allows complete automatic or batch control over the analysis process using OLE.  CodeReview can be controlled via an OLE client.  CodeReview (VBREVIEW.EXE) exports the following public methods and properties.

Methods

About	 Shows CodeReview about box

Break	 Stops analysis

Go        	 Starts analysis, requires that the object.Project property to be set

Quit 	 Ends CodeReview object instance

Properties

List	 Listing of events generated by analysis. Range is 0 to object.ListCount - 1

ListCount	 Number of items in object.List property

Running	 Returns True if analysis is running, False if not

Project	 Sets/Gets the project name (like C:\VB4\TEST.VBP)

Style	 Returns the type of event the index represents. Range is 0 to object.ListCount - 1

When used together these methods an properties allow a client application to process and return information about a project. See the DEMOCR.VBP project which is an example client program which controls a  CodeReview session.

Creating an object instance of CodeReview

OLE Interface

12006


Creating a VB/CodeReview Object Instance
Creating An Object Instance of CodeReview

This section describes the process of creating an object instance of CodeReview. To use CodeReview as an OLE server you need to create an object using the Global|Dim|Public|Private keyword. An example follows:

    Dim Demo As Object

With the empty object created, set it to an instance of CodeReview using the Set keyword as shown in the following code:

    Set Demo = CreateObject("VBCodeReview.Access")

You are now ready to access the properties and methods of CodeReview.

Always end the the instance of CodeReview using the object.Quit method, and then remove it using the Set object = Nothing statements.

DEMOCR.VBP, a sample OLE client to access CodeReview.

Creating a  CodeReview Object Instance

120012


About Method

This method displays system information about CodeReview when running as an OLE server.

Syntax

object.About

Part 	Description

 object 	An object that evaluates to an instance of CodeReview.

Creating an object instance of CodeReview

DEMOCR.VBP, a sample OLE client to access CodeReview.

About Method

13008


Go Method

This method starts analysis when running as an OLE server. This method requires that the object.Project property to be set before executing.

Syntax

object.Go

       Part          	Description

object         	An object that evaluates to an instance of CodeReview.

Creating an object instance of CodeReview

Go Method

12008


Break Method

This method stops analysis when running as an OLE server.

Syntax

object.Break

Part 	Description

object          	An object that evaluates to an instance of CodeReview.

Creating an object instance of CodeReview

Break Method

12009


Quit Method

This method ends CodeReview object instance.

Syntax

object.Quit

Part 	Description

object         	An object that evaluates to an instance of CodeReview.

Creating an object instance of CodeReview

Quit Method

12010


Project Property

This property sets or gets the Visual Basic project that CodeReview will process.

Syntax

object.Project [= project name]

Part 	Description

object         	An object that evaluates to an instance of CodeReview.

Project	A qualified Visual Basic 3.0 or 4.0 project filename (for example, C:\VB\TEST.VBP)

Creating an object instance of CodeReview

Project Property

12011


Running Property

This property sets or gets the state of CodeReview.

Syntax

object.Running [= True|False]

state = object.Running

Part 	Description

object          	An object that evaluates to an instance of CodeReview.

Running	True if CodeReview is processing a project, False otherwise.

Creating an object instance of CodeReview

Running Property

12013


ListCount Property

This property provides the count of a list of events generated by CodeReview.

Syntax

object.ListCount

Part 	Description

object       	An object that evaluates to an instance of CodeReview.

ListCount	A long value indicating the count of the object.List property array.

Creating an object instance of CodeReview

ListCount Property

12014


List Property

This property provides access to a list of events generated by CodeReview.

Syntax

object.List(index)

Part 	Description

object       	An object that evaluates to an instance of CodeReview.

List            	An array of events

index         	A pointer into the object.List() array, with a range from 0 to object.ListCount - 1

Creating an object instance of CodeReview

List Property

12015


Style Property

This property provides access to a list of descriptions describing the type of events generated by CodeReview. Read only.

Syntax

object.Style(index)

Part 	Description

object         	An object that evaluates to an instance of CodeReview.

Style          	An array of integers which represent the type of event contained in the object.List property

index          	A pointer into the object.Style() array, with a range from 0 to object.ListCount - 1

The value from this property returned will be 1 to 6, as shown below.

Value        	Description

     1	The event indicated by index is a Logic event.

     2	The event indicated by index is a Portability event.

     3	The event indicated by index is a Performance event.

     4	The event indicated by index is a Windows API event.

     5	The event indicated by index is a Standards event.

     6	The event indicated by index is a Usability event.

Creating an object instance of CodeReview

Style Property

12016


Show Help
Query Show Help

You are exiting the Wizard without letting the Wizard begin processing. You can see help on using CodeReview right now if you want to.

Choose:

•	Yes to see help on using CodeReview.

•	No to skip seeing help.

Show Help

11022


Start Now
Query Start Now

You just loaded a project. You can start processing this project right now if you want to. This dialog is only shown for the first project loaded. After that, it is assumed you are not processing an entire project, but rather are working with individual files of the project.

Choose:

•	Yes to start processing now.

•	No to skip processing right now.

Query Start Now

11021


Options

Use these settings to configure your CodeReview environment.

General Settings

Use the General settings to control the program environment.

•	Show Tip of the Day at Startup shows a Tip Of the Day dialog when the program starts.

•	Show Wizard at Startup automatically runs the Wizard when the program starts.

•	Show Status Bar shows prompt messages at the bottom of the screen.

•	ShowTool Bar shows prompt messages at the bottom of the screen.

•	Show Tool Tips shows tooltips when the mouse is held over a toolbar button for 2 sec.

•	Preferred Extension for File Open Dialogs lets you specify the type of project file to use, .mak for Visual Basic 3 or .vbp for Visual Basic 4.

Review Settings

Use the Review settings to control how the review is run.

•	Default to Interactive Mode -  runs reviews in interactive mode, not set runs review in batch mode.

•	Display Quality Metrics - displays code line and other metrics about the review

Paths Setting

Use the Path setting to identify the location of the Visual Basic help file on your system. CodeReview needs this information in order to provide links from its own review information to relevant topics in Visual Basic's help file.

Preferences

12038


Print Dialog

Use this dialog to print results of CodeReview processing.

After selecting Print from the File menu, choose:

•	OK to print.

•	Setup to set the page orientation (landscape or portrait) and choose the printer to use.

•	Cancel to exit without saving any changes to the print setup.

Also see the Print Setup dialog.

 Print Dialog

1300


Printer Setup Dialog

Use this dialog to set printing options, and choose a printer.

Choose:

•	OK to accept the printer as defined.

•	Cancel to exit without saving any changes to the print setup.

•	Font to set the font to use when printing.

Also see the Print dialog.

Printer Setup Dialog

711


Save Changes
Query Save Changes

You have made changes to messages. Do you want to save the changes?

Choose:

•	Yes to save changes.

•	No to lose changes and exit now.

•	Cancel to return to the Message Manager.

·

Save Changes

12039


Choose Print Item

You chose the OK button, but you did not select anything to print.

Print Dialog

Print Setup Dialog

Choose Print Item

11085


No Printers Defined

There are no printers defined on this system. You need to define a printer and then try to print.

No Printers Defined

11086


Backup System

Before modification, if the backup preferences are set, files are backed up to a subdirectory labeled \Backup under the program directory. For example, if the program directory is C:\NuMega, then the root backup directory would be C:\NuMega\Backup.

Each project to be backed up is then given its own sub directory under the backup root directory. An extension in the range of 000 to 999 is assigned to the subdirectory. This extension is the backup version number. If it seems strange to have a directory with an extension don’t worry! Its perfectly legal and fully supported under Windows 3.x, Windows95 and Windows NT, its just not common!

As each project is saved into its backup directory, the backup directory extension is incremented. For example, if you were backing up C:\Program Files\Microsoft Visual Basic\Redtop.vbp, then the first time this project would be saved it would be under C:\NuMega\Backup\Redtop.000. The next would be C:\NuMega\Backup\Redtop.001 and so on. When extension 999 is hit, the number wraps around and starts overwriting the oldest backup copy.

The files are placed into their subdirectory without modification. To restore a project copy the files from the backup directory or load them into Visual Basic.

Note that the oldest backup copy is not necessarily the backup with the lowest extension number.

Backup System

12005


Code Review Not for Current Project

The review you just opened was not generated by the project open at this time. There may be synchronization problems as you try to view events and the source code context for those events.

 Code Review Not for Current Project

13000


Alert Manager Save Changes
Query Save Changes

You have made changes to messages. Do you want to save the changes?

Choose:

•	Yes to save changes.

•	No to lose changes and exit.

•	Cancel to return to the Alert Manager.

·

Alert Manager Save Changes

13001


Save System Information

You can save the contents of the system information display to disk. It will be printed to a text file titled MCINFO.TXT located under the applications path.

Save System Information

13002


Project Invalid

For some reason, this project cannot be processed.

Project Invalid

13003


Text Too Long

The text entered for this record is too long. Reduce to the size indicated and try again.

Text Too Long

13004


Enter/Edit Text

This dialog lets you change the single line event display.

Note that you should not make changes to these entries without understanding what you are doing.

Enter/Edit Text

13005


Query Cancel Format

The escape key was pressed while processing was underway. You are now prompted to cancel or continue the processing.

Choose:

•	Yes to save stop processing now.

•	No to resume processing.

Query Cancel Format

12007


Get Object Name
Query Cancel Get Object Name

When prompted with the Get Object Name dialog, you chose to cancel.

•	To exit process press Yes.

•	Tto continue processing using the default object name press No.

•	To cancel this process, and stop processing, press Cancel.

Get Object Name

13013


Learning New Classname
Learning New Object Name

While scanning a form for object names, an object was found which is not in the known classname database.The dialog shows the object classname and is asking you to enter what prexif should be used for objects of this type.

Learning New Classname

11024


Outdated Knowledge Base

VBREVIEW.EXE and the CodeReview knowledge base are out of sync. You might have updated RESOURCE.BIN (or another knowledge base file) without updating VBREVIEW.EXE; or vice versa. In any event, the knowledge base and VBREVIEW.EXE must track together. In this case, VBREVIEW.EXE generated a message which was not found in the knowledge base (RESOURCE.BIN).

You need to go to our internet web site (http://www.numega.com) and get the most recent knowledge base update.

Getting Technical Support

Outdated Knowledge Base

13009


Saving Reviews

To save a review to disk, use the File...Save Review option from the Results Window.

Saving Reviews

13010


Export Review

You can export a review to a text file using the File...Export Review menu option from the Results Window.

Export Review

13011


Loading Reviews

To load a saved review from disk, use the File...Load Review option from the Results Window; or use the File...Load Review option from the Project Window.

Loading Reviews

13012


Answer Wizard
NuMega Answer Wizard

The NuMega Answer Wizard is used in many new NuMega products. It provides a more user friendly means to access help. Type in your question in plain english; or choose a previous help topic from the drop down. Press enter or choose search.

If the Answer Wizard cannot match your request or you simply want to search help directly just press F1 anywere. Choosing the Help Options tab of the Answer Wizard will let you access the most common help functions.

Answer Wizard

1961


Find Dialog - Message Manager
Find Dialog

Use this dialog to search messages for user defined strings.

Enter the text you want to locate, then press Find.

Find Dialog - Message Manager

13015


Ignore Messages
Ignore Message Dialog

This dialog lets you supress events from the current message for the duration of this procedure, module or project.

Choose the option you wish, then choose Apply. To exit this dialog without making any changes, choose Cancel. Note that once 'ignored', you cannot 'unignore' a message. To allow processing of all ignored messages, you need to stop and then restart the review.

Ignore Messages

13016