Interactive Development Environment (IDE) Enhancements
To provide a more integrated development environment for your projects and applications, Visual FoxPro contains the following improved functionality for the IDE.
When docked, the Project Manager window contains the following additional shortcut menu commands that are available on the Project menu:
Closes the Project Manager.
Add Project to Source Control
Creates a new source control project based on the current project. Available only when a source code control provider is installed and specified on the Projects tab in the Options dialog box.
Displays the error (.err) file after running a build.
Refreshes the contents of the Project Manager.
Clean Up Project
Removes deleted records from the Project Manager (.PJX) file.
When you build a project, application, or dynamic-link library, Visual FoxPro automatically generates an error (.err) file that includes any error messages, if they exist, when the build process completes. When you select the Display Errors check box in the Build Options dialog box, Visual FoxPro displays the .err file when the build completes. Selecting the Recompile All Files check box includes compile errors in the .err file. Build status messages usually appear in the status bar. However, in previous versions, if the build process is interrupted, Visual FoxPro did not write the .err file to disk.
In the current release, Visual FoxPro writes build status and error messages to the .err file as they occur during the build process. If the build process is interrupted, you can open the .err file opens to review the errors.
If no errors occur during the build, the .err file is deleted.
If the Debug Output window is open, build status and error messages appear in the window. You can save messages from the Debug Output window to a file.
For more information, see.
Design time support for entering property values greater than 255 characters and extended characters, such as CHR(13) (carriage return) and CHR(10) (linefeed), has been added to visual class library (.vcx) and form (.scx) files. You can now enter up to 8k characters in length.
Extended property value support is only available through the Properties Window (Zoom dialog box) for custom user-specified properties as well as certain native ones such as CursorSchema and Value. For properties not supported, you can still specify values which are longer than 255 characters, or contain carriage returns and linefeeds by assigning them in code such as during the object's.
The Zoom dialog box and Expression Builder dialog box have been updated to support this. The Properties window includes a Zoom (Z) button that appears next to the property settings box for appropriate properties.
Property values that exceed 255 characters or include carriage return and/or linefeed characters are stored in a new format inside the .vcx or .scx file. If you attempt to modify these classes in a prior version, an error occurs.
This feature is particularly useful for setting the CursorAdapter CursorSchema property to any schema expression when schemas might exceed 255 characters.
The Properties window font can now be specified by the new Font shortcut menu option. This new menu replaces the Small, Medium and Large font menu items used in prior versions. This font is also used in the description pane, and object and property value dropdowns.
Bold and italic font styles are reserved for non-default property values and read-only properties, respectively. If a bold or italic font style is chosen, then the Properties window inverts the displayed behavior. For example, if one chooses an italic font style, read-only properties appear in normal font style and all others in italic.
Colors can be specified for certain types of properties by right clicking on the Properties Window and selecting following menu items:
Non-Default Properties Color
Sets color for properties whose values have changed from default setting (same properties that are displayed when the Non-Default Properties Only menu item is selected).
Custom Properties Color
Sets color for custom properties.
Instance Properties Color
Sets color for custom properties that have been added to the current class instance (same properties that appear in bold in the).
If a conflict exists between color settings, the Instance setting takes priority followed by the Non-Default one.
For more information, see, , , and .
When adding a new property to a class, you can specify an initial value other than the default in the New Property dialog box. Subclasses inherit these default values unless you reset the default values to the parent class. In previous versions, you had to set the default value for the new property by selecting the property in the Properties window and setting the default value.
For more information, see.
Visual FoxPro performs background compilation when syntax coloring is turned on in the Command window and Visual FoxPro editors for program (.prg) files, methods, stored procedures, and memos. The Expression box in the Expression Builder dialog box also includes support for background compilation and syntax coloring when turned on.
When the single and current line of code that you are typing contains invalid syntax, Visual FoxPro displays the line of code with the formatting style selected in the Editor tab of the Options dialog box.
Syntax coloring must be turned on for background compilation to function. Background compilation does not detect invalid syntax in multiple lines of code, including those containing continuation characters.
For more information, see.
Visual FoxPro now supports copying in RTF (Rich Text Format) to the clipboard. Visual FoxPro preserves the style (bold, italic, and underline) and color attributes.
RTF is supported only in the FoxPro editors that allow for syntax coloring, such as the Command window and editing windows opened with. The RTF clipboard format is only supported when syntax coloring is enabled such as from . You can disable RTF clipboard format with the _VFP .
Thedoes not support RTF.
The following improvements were made to Find support:
If a word is selected in a Visual FoxPro editor, thewhen opened now displays the word in the Look For drop-down box. If Find has not yet been used for a running instance of Visual FoxPro, a word positioned under the insertion pointer will appear in the Look For drop-down. If multiple words are selected, only the first word appears in the drop-down (use copy and paste to enter multiple words).
When a Browse window is open and you search for a word with the Find dialog box, you can search for the word again (Find Again) after the Find dialog box is closed by pressing the F3 key.
You can now use Find to search for content in Name column of the Watch and Locals debug windows (see). When searching object members, Find searches in these debug windows are limited to nodes that have been expanded and one level below.
Constants (#DEFINE values) can be viewed in the Trace Window when you hover over it with the mouse.
Visual FoxPro evaluates constants as expressions in the Trace Window and may have difficulty interpreting a specific #DEFINE when you hover over it with the mouse. Consequently, if there are multiple expressions on a line, they are all displayed in the value tip.
Visual FoxPro now saves IntelliSense settings, such as turning IntelliSense on, between user sessions. These settings are controlled by the _VFP EditorOptions property. In addition, the settings in the _VFP EditorOptions property are saved in the FoxUser.dbf resource file. For more information, see.
Selected IntelliSense features are available at run time in distributed Visual FoxPro 9.0 applications. In order to use IntelliSense at run time, you need to set the _FOXCODE and _CODESENSE variables, and EditorOptions Property.
With runtime applications, syntax coloring does not need to be turned on for an editor to support IntelliSense.
For more information, see, , and .
Visual FoxPro now supports IntelliSense within theand .
WITH ObjectName [AS Type [OF ClassLibrary]]
FOR EACH ObjectName [AS Type [OF ClassLibrary]] IN Group
The Type parameter can be any valid type, including data types, class types, or ProgID. If the class name cannot be found, Visual FoxPro disregards Type and does not display IntelliSense for it.
The type reference does not affect the functionality of the application at run time. The type reference is only used for IntelliSense.
The ObjectName expression can refer to a memory variable or an array.
The ClassLibrary parameter must be in a path list that is visible to Visual FoxPro. You must specify a valid class library; references to existing objects are not valid. If Visual FoxPro cannot find the specified class library, IntelliSense does not display.
Types expressed as ProgIDs and class libraries do not require quotation marks ("") to enclose them unless their names contain spaces.
When a user types the AS keyword, IntelliSense displays a list of types registered in the FoxCode.dbf table with Type "T". If you have specified a valid type, typing a period within a WITH ... ENDWITH or a FOR EACH ... ENDFOR command displays IntelliSense for that object reference.
Visual FoxPro supports IntelliSense for nested WITH ... ENDWITH and FOR EACH ... ENDFOR commands. The following is an example of nested WITH ... ENDWITH commands in a class defined in a program (.prg) file named Program1.prg. To use, paste this code into a new program named Program1.prg, save it and then type a period (.) inside the WITH ... ENDWITH block.
DEFINE CLASS f1 AS form MyVar1 = 123 ADD OBJECT t1 AS mytext PROCEDURE Init WITH THIS AS f1 OF program1.prg WITH .t1 AS mytext OF program1.prg ENDWITH ENDWITH ENDPROC ENDDEFINE DEFINE CLASS mytext as textbox MyVar2 = 123 ENDDEFINE
IntelliSense provides limited List Values functionality for selected properties that begin with a "T" or "F" within a WITH ... ENDWITH or FOR EACH ... ENDFOR command. This is done to avoid possible conflicts with the common property values True (.T.) and False (.F.). If you just type ".T" or ".F" and press Enter, the word selected in the List Value drop-down does not expand. You need to type at least two letters for IntelliSense to insert the selected word.