The Studio Desktop

The Studio is the hub of application development in Visual DataFlex. The Studio manages its projects inside Workspaces, and coordinates all of the other tools that make up Visual DataFlex, so that they can be cohesively applied to a project.

Use the context help feature (F1) to obtain help regarding any particular Studio dialog.

If you are new to the Visual DataFlex Studio, working through Quick Start and Tutorials is the fastest and easiest way to familiarize yourself with application development in Visual DataFlex.

  • Menus

  • Toolbars

  • Docking Windows

  • Status Bar

  • Hotkeys

See Also

Code Editor

Visual Designer


Studio Menus

The Visual DataFlex Studio Menus provide organized access to all of the capabilities of the development environment.

  • File Menu

  • Edit Menu

  • Text Menu

  • View Menu

  • Project Menu

  • Debug Menu

  • Tools Menu

  • Window Menu

  • Help Menu

As you become more familiar with using the various capabilities, you will use the Studio Toolbars or HotKeys as alternatives for navigation.

See Also

The Studio Desktop


File Menu

New

Select this option to create a new project, component or file. For more information refer to Create New.

Keyboard shortcut Ctrl+N.

Open File(s)...

Select this option to open a project, component or file. Selecting the Open File... option activates the open file dialog.

Keyboard shortcut Ctrl+O.

Recent Files

The Studio maintains a list of the most recent files that you opened in the current workspace. To re-open one of these files, select Recent Files. A sub-menu will be shown listing the most recently opened files.

Click the name of any file on this menu to open it.

New Workspace

Launches the New Workspace Wizard. Select this option when you want to create a new Visual DataFlex application.

Open Workspace

Select this option when you want to open an existing workspace. Workspaces are opened by selecting the Studio Workspace file (workspacename.sws) using the Open Workspace dialog or by double-clicking on the Studio Workspace file in Windows Explorer. You can also use the Recent Workspaces... option. The Studio Workspace file is usually located in the root folder of the workspace.

If you open a workspace by selecting the Workspace file (workspacename.ws), and there is no Studio Workspace file in the Home folder for the workspace, the Studio will automatically launch the Workspace Migration Wizard. The Workspace file is usually located in the Programs subfolder of the workspace.

Recent Workspaces

The Studio maintains a list of the most recent Workspaces that you worked on. To select one of these Workspaces, select Recent Workspaces. A sub-menu will be shown listing the most recently used Workspaces.

Click the name of any Workspace on this menu to open it.

Close <filename>

Select this option to close the current file. The name of the current file is shown as part of the menu option, has the focus of the Code Editor or Visual Designer, is shown in bold in the Window Navigator and displayed to the left on the Status Bar.

Close All

Select this option to close all open files.

Save

Select this option to save changes to the file that currently has the focus.

Keyboard shortcut Ctrl+S.

Save <filename> As

Select this option to change the current file under a different name.

Save All

Select this option to save every open file that has pending changes.

Print Options

Select this option to set the various print options that can be applied when printing the contents of the code editor.

Print

Select this option to print the contents of the code editor for the currently selected file or component.

If you have a section of text selected, then only the selected text will be printed. If no text is selected, then the entire contents of the editor control will be printed.

Keyboard shortcut Ctrl+P.

Exit

Select this option to close the Studio. You will be prompted to save any unsaved changes.

Keyboard shortcut Alt+F4.

See Also

Menus


Create New

Use the Create New dialog to create a new file or component for your current project.

Your project's components and files are created from a template or by running a wizard. Components and files are divided into the following tab page:

  • Project – used to create new windows and web projects.

  • View / Report – used to create views and reports for windows projects.

  • Dialog / Lookup – used to create modal dialogs and data lookup list for windows projects.

  • Web Object – used to create web browser components (for data entry and reporting) and web service components for web projects.

  • Web Markup – use to create web markup files (ASP, HTML, etc.) for web projects.

  • Class – used to create new classes for windows and web projects. These include

  • Create a new class

  • Multiple classes

  • Client web service classes

  • COM classes (Active/X, Automation Libraries, Embedded Objects)

  • Other – use to create other files. These include Business Process objects, empty Visual DataFlex source files and other miscellaneous text files.

The available components in each tab page allow you to create new components by either running a wizard or by creating a component based on an associated template file. If you highlight a template or wizard on one of the tab pages, a brief description of it will be displayed in an info box on the right

As appropriate a new component is added to the current project. You will not be allowed to create the wrong type of component for a project type. Windows components (e.g. views, reports, dialogs) cannot be added to a web project. Web components (e.g. web browser objects, web server objects, Web markup) cannot be added to a windows project. If you wish to select a different current project a combo form at the bottom of the dialog allows you to do this.

The contents of each tab page can be customized allowing you to add your own specialized components based on custom templates (see Configure Create New).

OK

Select the template or wizard that represents the type of file or component you wish to create then click the OK button.

Cancel

Click the Cancel button to exit the dialog without creating any new files.

See Also

Configure Create New

Template Components


Create New from Template

Create a New...

The Create a New... dialog is invoked from the Create New Dialog when creating new template based components.

Depending on the type of component you are creating you will be asked to enter an object name, file path, and file name, or, just a file path and file name.

The input requirements for the different component types are discussed in their individual help pages:

  • Project

  • View / Report

  • Dialog / Lookup

  • Web Object

  • Web Markup

  • Class

  • Other


Create New - View / Report

The Create New View /Report tab page is used to create new views and reports for windows projects. These new components are added to your current project, which must be a windows project.

These new components may be created by selecting a wizard or by creating a new file based on a template. If you choose to create your component by running a wizard, the wizard will guide you through this process.

If you choose to create a component by selecting a wizard, a dialog will appear asking you to enter the following:

Object Name

Select an object name for the component. It is recommended that all object names are prefixed with an “o”. If you omit the “o” the Studio will ask if you would to add this. This is recommended but not required.

Directory Path

The directory path determines where the new component file will be saved. Normally this should be your AppSrc directory, the default choice, or a sub directory under the AppSrc directory.

File Name

Enter the file name for the new component. By default this name will be the name of the object with the “o” prefix removed. If you do not provide a file extension an extension appropriate for this component will be added.

See Also

Create New


Create New - Project

The Create New Class tab page is used to create new projects.

Windows Projects

If you choose to create a new windows project you will be asked to select a directory path and file name for the new project. The file will be saved, opened and set as the Studio’s current project. The file’s contents is based on the contents of the template file associated with the selection.

Web Projects

If you choose to create a new web project, the Assign Web Application Information dialog will allow you to set up all the information needed for a web project.

See Also

Create New


Assign Web Application Information

Web Application Name

This is the name used by the Web Application Administrator. After it has been assigned it is maintained by the Web Application Administrator and the Global.asa file.

By default the name of the workspace (i.e., the name of the workspace’s .SWS file) will be used. This is recommended choice, unless the name is already being used.

Virtual Directory Name

This is the web-share name, which is used to identify your AppHtml directory over the Internet. By default it will suggest the name of the workspace with all spaces and underscores removed. Unless this results in a duplicate name, this is the recommended choice.

Directory

The directory name will always be the path of your AppHtml directory and may not be changed.

Project Name

The project name will always be WebApp.src. Only one web application is allowed within a workspace and that application name should not be changed.

When a web project is created, project will be added to the Web Application Administrator, a new Global.asa will be created in your AppHtml directory, the AppHtml directory’s web share (virtual directory name) will be assigned and the WebApp.src will be created and loaded.

If a Web Project already exists, you will be warned and allowed to proceed. If you create another project, your existing web project will be replaced.

See Also

Create New - Project


Create New - Dialog / Lookup

The Create New Dialog / Lookup tab page is used to create modal dialogs for windows projects.

These components can be dialogs based on the ModalPanel class or dialogs that are bound to data based on the dbModalPanel class. The most typical use of a data dialog is a Lookup list and a special wizard is provided to create these dialogs.

These components are not directly added to your current project as they tend to be added indirectly by other components. Before creating a Dialog / Lookup component the current project must be a windows project.

These new components may be created by selecting a wizard or by creating a new file based on a template. If you choose to create your component by running a wizard, the wizard will guide you through this process.

If you choose to create a component by selecting a wizard, a dialog will appear asking you to enter the following:

Object Name

Select an object name for the component. It is recommended that all object names are prefixed with an “o”. If you omit the “o” the Studio will ask if you would to add this. This is recommended but not required.

Directory Path

The directory path determines where the new component file will be saved. Normally this should be your AppSrc directory, the default choice, or a sub directory under the AppSrc directory.

File Name

Enter the file name for the new component. By default this name will be the name of the object with the “o” prefix removed. If you do not provide a file extension an extension appropriate for this component will be added.

See Also

Create New


Create New - Class

The Create New Class tab page is used to create new classes for windows and web projects. These include:

  • Create a new class

  • Multiple classes

  • Client web service classes

  • COM classes (Active/X, Automation Libraries, Embedded Objects)

See Also

Create New


Create a New Class

The Create a New Class dialog is used to create new classes for windows and web projects and to optionally add these classes to your class palette. Upon completion the class will be created and opened within the Studio.

You can load this dialog by selecting the “New Class” option from the “Class” tab page in the “Create New” dialog (File / New / Class).

Select superclass source from

A new class must be based on an existing class. That class can be selected from one of three sources:

  • Project – the superclass is defined within your current project

  • Class Palette – the superclass is defined in your class palette

  • File – the superclass is defined in a file, which you must select

Superclass Name

Select the superclass from a list of classes in drop down list. The classes in this list are based on the superclass source you selected.

Class Name

Select the name for your new class. This name will also be used as the default class filename.

Add to Class Palette / Group

You may choose to add the new class to your class palette. If you do so, you will be asked to select a group name for the class. You may select a name from the existing class palette groups or enter a new group name.

Directory Path

The directory path determines where the new class file will be saved. Normally this should be your AppSrc directory, the default choice, or a sub directory under the AppSrc directory.

File Name

Enter the file name for the new class. By default this name will be the name of the class, which is the recommended name for the file.

Ok

This confirms your changes and closed the dialog. A new class will be created and loaded in the Studio.

Cancel

This closes the dialog without making any changes

See Also

New Subclasses Wizard

Create New


Web Service Client Class Generator

The Web Service Client Class Generator is provided for automatically creating Visual DataFlex wrapper classes for client web services.

You can load this dialog by selecting the “Client Web Service Class” option from the “Class” tab page in the “Create New” dialog (File / New / Class).

WSDL URL

The class generator requires that you provide it with the location of a web-service’s description (its WSDL location). Enter (or paste) the WSDL name into this form. The combo list contains recently entered WSDL URLs.

Parse

Click the Parse button to locate the entered WSDL URL, load it, parse it, and determine how it should be represented as a Visual DataFlex class.

The generator parses the WSDL document and creates a sub-class based on that information. If the parsing was successful, the class is displayed in the class tab page; the WSDL that was parsed is displayed in the WSDL tab page; a summary of the web service is shown in the parse details tab page.

The generator is now ready to create the new class for use in your Visual DataFlex applications.

Generate Class

After the WSDL has been parsed you may click the Generate Class button. This will create the Visual DataFlex wrapper class for the web service and all additional files required to integrate the class directly in the Studio so that it can be accessed from the Studio’s Class Palette.

A dialog appears that allows you to determine the Visual DataFlex class name and a group name in the controls palette. Normally you should accept the default class and palette defaults. Click the “OK” button in this dialog to complete the class generation.

Regenerating Classes

You are allowed to regenerate classes. For example, if your server web-service changes, you will need to generate the class again. If the generator sees that you are generating a duplicate class it will warn you and allow you to overwrite the existing class definition.

This is all you need to do to create a web-service client. The class is now created and is fully registered within the Studio. At this point, you can choose to create additional clients or you can close the class generator and use the client in your applications.

For more information refer to Publishing and Using Web Services.

See Also

Create New


Web Service Client Class Generator - Class

This tab page is part of the Web Service Client Class Generator. This displays information about the parsed WSDL document. It provides a summary of the class information that will be generated for this service.


Web Service Client Class Generator - WSDL

This tab page is part of the Web Service Client Class Generator. This displays information about the parsed WSDL document. It displays the WSDL document that was parsed.


Web Service Client Class Generator - Parse Details

This tab page is part of the Web Service Client Class Generator. This displays information about the parsed WSDL document. It provides summary information about the web service (such as service name, port name, WSDL location and service location) and it provides technical information for each service method (such as method name, parameters, SOAP style and namespaces).


Import ActiveX Control

Use the Import ActiveX Control dialog to select an installed ActiveX control that you want to use in your application. The dialog will build the necessary class wrapper and register the class so that it can be visually modeled in the Studio.

You can load this dialog by selecting the “Import COM ActiveX” option from the “Class” tab page in the “Create New” dialog (File / New / Class).

Importing

To import an ActiveX control follow these steps…

  1. Select the ActiveX library you want to import from the available list. There may be one or more controls within library, which you may selectively import. The location and name of the physical library is displayed below the library list, to assist you confirming that you have selected the correct library.

  2. Once you have selected the library, the controls that you can import from it are listed below in a grid. Check each control that you wish to import in the Generate column.

Data Aware Wrapper Classes

For each control that you select, you can decide to create it as a regular class or to make it data-aware class. Check the box in the "Data-Aware" column for each control that you want generated as a data-aware class.

Many ActiveX components support the concept of a default/bindable property. When you check the data aware box, the class generator will generate the wrapper class so that the control's default/bindable property can be bound to a Table.Column value from a DataDictionary object.

For more information refer to: Data Binding

Class Name

The Studio generates a default class name for each control that you import. The default name is based on the Control's name with prefix of "cCom". e.g. if you import the Microsoft calendar control the default class name would be cComCalendar. Prefixing the class name with "cCom" helps you to identify all of your COM wrapper classes. It also helps you to avoid name clashes with any existing Visual DataFlex classes.

If the class is to be data-aware, the default prefix becomes a "cComDb". This different prefix allows you to build applications with a mix of data aware and non data-aware versions of the same ActiveX control.

You may change the of each ActiveX wrapper class by editing the default class name(s) in the grid.

PKG Name

The Studio will provide a default name to write the DataFlex class to. You may change this name and path, but you should do so with caution, ensuring that the compiler will find the path. The default name of the package containing the class depends upon how many classes you are creating. If you are only creating one class, the name of the package will be the name of the class. If you are creating multiple classes, it will be the name of the ActiveX library, with a ".pkg" extension.

Group Name

Choosing a group name instructs the Studio where to install the control on its Class Palette. The drop-down list will show the existing group names.

You can create a new page by typing a new name, if you wish.

Generate

Click OK to generate the Visual DataFlex wrapper classes for your controls. When the Classes are generated, the appropriate .DFC files will be created, one for each class, and the bitmaps will be extracted from the ActiveX library and placed on the Control's Palette for you. If you created a data-aware control, a small "data-aware" image will be superimposed on the image for you that matches the existing Visual DataFlex-supplied data-aware classes.

See Also

Class Palette

Programming with ActiveX Controls

Create New


Import Automation Library

Use the Import Automation Library dialog to select an installed COM Automation object that you want to use in your application. The dialog will build the necessary class wrapper so that you can make COM calls to the object in your application.

You can load this dialog by selecting the “Import COM Automation” option from the “Class” tab page in the “Create New” dialog (File / New / Class).

The Import Automation Dialog is similar very similar to the Import ActiveX dialog. For more information refer to Import ActiveX Control.

See Also

Programming with ActiveX Controls

Create New


Import Embedded Object

Use the Import Embedded Object dialog to select an COM embeddable object that you want to use in your application. The dialog will build the necessary class wrapper and register the class so that it can be visually modeled in the Studio.

You can load this dialog by selecting the “Import COM Embedded Object” option from the “Class” tab page in the “Create New” dialog (File / New / Class).

The Import Embedded Objects Dialog is similar very similar to the Import ActiveX dialog. For more information refer to Import ActiveX Control.

See Also

Programming with ActiveX Controls

Create New


New Subclasses Wizard

The new subclass wizard provides a mechanism for creating multiple classes . This is sometimes used to create a “layer” of classes within a workspace or a library. These classes will be based on existing classes and will tend to have a similar naming convention (a similar prefix or suffix).

The new classes will be added to the workspace’s class palette. You will be given the option of removing the superclasses from the class palette. This gives you the ability to easily create a custom layer of classes for a workspace or library.

This wizard will allow you to optionally place of the new subclasses in a file. This file can be used as a precompile package for your projects.

These classes may also all get used by a single file, which is then used a precompiled package.

The wizard is designed to guide your through the creation of these classes.

Don't use this wizard for the normal class creation process – use the New Class option in the Create New Class tab page instead.

Next Step

Class Type and Directory Path


New Subclasses Wizard - Welcome

The new subclass wizard provides a mechanism for creating multiple classes . This is sometimes used to create a “layer” of classes within a workspace or a library. These classes will be based on existing classes and will tend to have a similar naming convention (a similar prefix or suffix).

The new classes will be added to the workspace’s class palette. You will be given the option of removing the superclasses from the class palette. This gives you the ability to easily create a custom layer of classes for a workspace or library.

This wizard will allow you to optionally place of the new subclasses in a file. This file can be used as a precompile package for your projects.

These classes may also all get used by a single file, which is then used a precompiled package.

The wizard is designed to guide your through the creation of these classes.

Don't use this wizard for the normal class creation process – use the New Class option in the Create New Class tab page instead.

Next Step

Class Type and Directory Path


New Subclasses Wizard - Class Type and Directory Path

This determines where all the new files will be located. This should be your AppSrc path or a directory below the AppSrc path.

Next Step

Precompile Package Information


New Subclasses Wizard - Precompile Package Information

If you wish, you can create a new file, which will include all of the new classes created by this wizard. This is referred to as a “precompile package” and can be used as your precompile package when placed at the top of your project.

If you wish to create a precompile package, select the checkbox on this page and select a file name for that package and a first package name.

File Name

Enter the name of the precompile file. This will be placed in the same directory as the new classes. If no file extension is provided, “.pkg” will be provided.

First Package

The first line in a precompile package often contains a use statement that brings in another precompile package. This provides a mechanism for nesting precompile packages. For example, the first line of a windows package might be “use DfAllent.pkg”, which would bring the standard system packages into your custom package.

Next Step

New Class Naming Rules


New Subclasses Wizard - New Class Naming Rules

This page allows you to:

  • Determine if the superclasses should be removed from the class palette

  • Define class naming rules by applying prefixes and suffixes to the new classes

  • Determine the group names for the new classes

Superclasses

If you select the “Remove superclasses from class palette” checkbox, the superclasses that the new classes are based on will be removed from the class palette. You will want to select this option if your intention is to always use these new classes in place of the superclasses.

Note that the while superclasses are removed from the class palette, they are still available and may be used – they just can’t be selected from the class palette.

Important

If you want your new classes to be used as the default class in the wizards and in the Data Dictionary Object’s Table/Column drag and drop selector you will want to define these new classes in the Class Preferences page in the Configure Workspace Properties dialog (Tools / Configure Workspace).

Subclass Name Rules

You are allowed to define a new prefix and/or suffix for the new classes. You accomplish this by entering an old suffix/prefix and a new suffix/prefix.

This mechanism provides a flexible mechanism for creating class names. The results of these selections will be presented to you in the next wizard page. You can always return to this page and make more changes allowing you to experiment with this feature and to apply customizations as needed.

Control Palette Organization

The new classes will be placed in the class palette by group name. This section allows you to choose the names for these groups. This provides a mechanism for placing the new classes into existing groups or to place the new classes into new groups. These choices can be further customized in the next wizard page.

Next Step

Select Classes to be Created


New Subclasses Wizard - Select Classes to be Created

This page allows you to select which classes will be created, how they will be named and how they will be grouped in the class palette.

Select classes from the following sources

This allows you to select which superclasses will be used as your base for creating new classes. Each time you make a change the classes displayed in the list below will change.

System Classes

Select this checkbox if you wish to create new classes based on the system classes. You could use this option if:

  • You wanted to create a layer of workspace classes based on the system classes. You could then directly use these classes in your workspace.

  • You are building a library of classes and you want those classes to be based on the system classes. This library of classes may then be used by other workspaces that include this library. If you are building a library of classes you should be running the workspace from the library’s workspace and not from the workspace that will be using this library.

Library Classes

Select this checkbox if you wish to create new classes based on a library. You could use this option if:

  • You wanted to create a layer of classes based on classes defined in one of the libraries used by this workspace. In such a case, you may have already run this wizard from within the library’s workspace to create the library set of classes (which were based on the system classes).

  • You wanted to build a library of classes and you wanted to base this library on another library. While this is supported, this may not be widely used, as the organization of nested libraries can get complicated.

Workspace Classes

Select this checkbox is your wish to create classes based on classes already defined directly in the current workspace.

While you can select any or all of these class locations, you will most often find that you want to select your classes from a single source.

Select Classes

A list if provided of all superclasses. Each row will contain the superclass name, the new class name, the new class group name and a create checkbox, which determines if a new class should be created.

The name of the new class is determined by the prefix and suffix settings you defined in the previous wizard page. The name can be edited here.

The group name is determined by the setting you defined in the previous wizard page and may also be edited here.

If you are not happy with the default choices for class and group names you may go back to the previous tab page and make changes.

Clicking on any column will sort the classes by that column. Click a second time and the sort order is reversed.

Buttons are provided to make the selection process easier.

Select All

This selects all classes

Clear All

The clears all classes

Toggle by Group Name

Often you will find that you want to select or de-select an entire group of classes. To do this, select a row in the grid and the press this button.

Of Special Note

  • This page was designed to make it very easy to select and to de-select classes. Make your choices carefully and avoid the temptation to subclass everything. These wizards will rarely be run and will usually only be run when you create a new workspace. It is worth spending a little extra time and getting things right.

  • This wizard is not meant to be used as the primary method for creating new classes. The New Class option in the Create New Class tab page is better suited for this task. It is expected that the creation of new classes will be a very common occurrence and that classes will most often be created as needed. This wizard is not the best choice for that type of operation.

Next Step

Class Creation Summary


New Subclasses Wizard - Class Creation Summary

The last page will build a report of all classes to be created. It also reconciles your choices making sure that there are no errors such as files already existing or duplication of class names. If any errors exist, those errors will be displayed at the top of the list. These errors must be corrected before any new classes can be created.

If no errors exist, the report will provide a summary of the classes to be created. You should review these classes and, if they are correct, select the Finish button.

Note

If you want your new classes to be used as the default class in the wizards and in the Data Dictionary Object’s Table/Column drag and drop selector you will want to define these new classes in the Class Preferences page in the Configure Workspace Properties dialog (Tools / Configure Workspace).


Create New - Web Object

The Create New Web Object tab page is used to create new web components for a web project. These new components are added to your current project, which must be a web project.

These components are used to create web browser objects (WBOs) and web service objects (WSOs).

These new components may be created by selecting a wizard or by creating a new file based on a template. If you choose to create your component by running a wizard, the wizard will guide you through this process.

If you choose to create a component by selecting a wizard, a dialog will appear asking you to enter the following:

Object Name

Select an object name for the component. It is recommended that all object names are prefixed with an “o”. If you omit the “o” the Studio will ask if you would to add this. This is recommended but not required.

Directory Path

The directory path determines where the new component file will be saved. Normally this should be your AppSrc directory, the default choice, or a sub directory under the AppSrc directory.

File Name

Enter the file name for the new component. By default this name will be the name of the object with the “o” prefix removed. If you do not provide a file extension an extension appropriate for this component will be added.

See Also

Create New


Create New - Web Markup

The Create New Web Markup tab page is used to create HTML, ASP and CSS files used by a web project. These components are web markup files and not Visual DataFlex source files. They are not added to your current project.

Before creating a Web Markup component the current project must be a web project.

New components may be created by creating a new file based on a template.

Wizards are available for creating web markup file but these are used as part of creating Web Object components. These wizards are selected from the Create New – Web Object tab page. If you choose to create a component by selecting a wizard, a dialog will appear asking you to enter the following:

Directory Path

The directory path determines where the new component file will be saved. Normally this should be your AppHtml directory, the default choice, or a sub directory under the AppHtml directory.

File Name

Enter the file name for the new component. If you do not provide a file extension an extension appropriate for this component will be added.

See Also

Create New


Create New - Other

The Create New Other tab page is used to create miscellaneous files for use by windows and web projects. These include Web Business Process objects, empty DataFlex source files and text files.

These components are never directly added to your current project.

New components may be created by creating a new file based on a template. If you choose to create your component by running a wizard, the wizard will guide you through this process.

If you choose to create a component by selecting a wizard, a dialog will appear asking you to enter the following:

Object Name

This is only required for Business Process objects.

Select an object name for the component. It is recommended that all object names are prefixed with an “o”. If you omit the “o” the Studio will ask if you would to add this. This is recommended but not required.

Directory Path

The directory path determines where the new component file will be saved. Normally this should be your AppSrc directory, the default choice, or a sub directory under the AppSrc directory.

File Name

Enter the file name for the new component. If this is a Business Process object, by default this name will be the name of the object with the “o” prefix removed. If you do not provide a file extension an extension appropriate for this component will be added.

See Also

Create New


Save Changes

Close All - Save Changes

This dialog appears when you are trying to close all open files, or close the current workspace or close the Studio and there are unsaved changes to one or more of these files.

File List

Each open file that has unsaved changes is listed here. By default, each file is selected as indicated by the checkboxes in the left margin of this list.

Click the checkboxes in the left margin to change the selected state of a file.

Operations

Select All

Choose Select All from the File List's context menu to check every file in the list.

Yes

Click Yes to save changes to each selected file.

No

Click No to discard changes to all listed files.

Cancel

Click Cancel to cancel the Close All, Close Workspace or Close Studio operation.


New Workspace Wizard

The New Workspace Wizard is used to create a new Workspace. The wizard will create a directory structure for the workspace and configure a connection to database that the workspace projects will use.

Activate the New Workspace Wizard by selecting "New Workspace..." from the File menu.

Follow the instructions on each wizard page to complete all the information and create your new workspace.

Next Step

Welcome

See Also

Configuring Database Drivers

Pervasive Connection Properties

MSSQL Connection Properties

ODBC Connection Properties

DB2 Connection Properties

Workspace Properties


New Workspace Wizard - Welcome

The New Workspace Wizard is used to create a new Workspace. The wizard will create a directory structure for the workspace and configure a connection to database that the workspace projects will use.

Activate the New Workspace Wizard by selecting "New Workspace..." from the File menu.

Follow the instructions on each wizard page to complete all the information and create your new workspace.

See Also

Configuring Database Drivers

Pervasive Connection Properties

MSSQL Connection Properties

ODBC Connection Properties

DB2 Connection Properties

Workspace Properties


New Workspace Wizard - Workspace Name

Name of the New Workspace

Enter the name of the new workspace. This name will be used to determine the name of the workspace configuration file. i.e. <workspace name>.sws.

The workspace name does not need to be unique. i.e. you may define multiple workspaces in different locations that use the same name.

Workspace Description

Enter text that describes the workspace in a meaningful way to your projects' end-users.

The workspace description is exposed to the end-user in the Database Builder and Database Explorer tools.

Workspace Root Directory

Enter the directory where the workspace will be located. The default path is C:\Visual DataFlex Projects\<workspace name>, or the folder containing the last workspace that you created.

You may click the '...' prompt to activate the Folder Selector dialog to choose a different path.

The wizard will construct a standard structure of sub-directories to contain all of the project files for each project in your workspace.

Edit Workspace Paths

Check this box to view or edit the standard structure of sub-directories for this workspace. It is recommended that you use the standard structure.


New Workspace Wizard - Workspace Paths (1)

New Workspace Wizard - Workspace Paths

Each workspace path specifies one or more directories where various project files are located. Multiple directories in one path must be separated by semicolon ";".

You may click the '...' prompt to activate the Folder Selector dialog to choose a different path.

The individual workspace paths are described in detail on the wizard dialog.


New Workspace Wizard - Workspace Paths (2)

New Workspace Wizard - Workspace Paths

Each workspace path specifies one or more directories where various project files are located. Multiple directories in one path must be separated by semicolon ";".

You may click the '...' prompt to activate the Folder Selector dialog to choose a different path.

The individual workspace paths are described in detail on the wizard dialog.


New Workspace Wizard - Database Type

Select the database type that you will be using in the projects in this workspace. You are generally not limited to one single database type, but the database selections that you make here will be recorded and used as defaults whenever you need to specify a database connection.

If you do not know which database type to choose or your projects will not connect to any database then choose "Embedded".


New Workspace Wizard - DB2 Database Connection

The information entered in this page is stored and used whenever you need to connect to your database while you are building projects in this workspace.

Data Source

Enter the name of the DB2 data source you are connecting to.

Login ID

Enter the user name and password used to login to your database

Store Password

Check this box to store the password. This will save you having to enter the password each time you need to login to the database while building projects in this workspace. The password is scrambled and stored in a configuration file but it is not encrypted.

Uncheck this box if you do not want your password stored in a configuration file.

Test Connection

Click this button to test the connection information that you have entered. The wizard will attempt to connect and login to the specified database.

Next Step

Setting up your Database


New Workspace Wizard - MSSQL Database Connection

The information entered in this page is stored and used whenever you need to connect to your database while you are building projects in this workspace.

Server Name

Enter the name of the MSSQL database server you are connecting to.

User Name

Enter the user name and password used to login to your database

Store Password

Check this box to store the password. This will save you having to enter the password each time you need to login to the database while building projects in this workspace. The password is scrambled and stored in a configuration file but it is not encrypted.

Uncheck this box if you do not want your password stored in a configuration file.

Database Name

Enter the name of the database you are connecting to

Test Connection

Click this button to test the connection information that you have entered. The wizard will attempt to connect and login to the specified database.

Next Step

Setting up your Database


New Workspace Wizard - ODBC Database Connection

The information entered in this page is stored and used whenever you need to connect to your database while you are building projects in this workspace.

Data Source

Enter the name of the ODBC data source you are connecting to.

User Data Sources

Check this box to show user data sources in the data sources combo list.

System Data Sources

Check this box to show system data sources in the data sources combo list.

Select File DSN

Click this button to select a DSN file as your data source.

Login ID

Enter the login ID and password used to login to your database

Store Password

Check this box to store the password. This will save you having to enter the password each time you need to login to the database while building projects in this workspace. The password is scrambled and stored in a configuration file but it is not encrypted.

Uncheck this box if you do not want your password stored in a configuration file.

ODBC Administrator

Click this button to launch the ODBC Administrator application.

Test Connection

Click this button to test the connection information that you have entered. The wizard will attempt to connect and login to the specified database.

Next Step

Setting up your Database


New Workspace Wizard - Pervasive Database Connection

The information entered in this page is stored and used whenever you need to connect to your database while you are building projects in this workspace.

Server Name

Enter the name of the Pervasive SQL database server you are connecting to.

User Name

Enter the user name and password used to login to your database

Store Password

Check this box to store the password. This will save you having to enter the password each time you need to login to the database while building projects in this workspace. The password is scrambled and stored in a configuration file but it is not encrypted.

Uncheck this box if you do not want your password stored in a configuration file.

Database Name

Enter the name of the database you are connecting to

Test Connection

Click this button to test the connection information that you have entered. The wizard will attempt to connect and login to the specified database.

Next Step

Setting up your Database


New Workspace Wizard - Database Connection for Other Drivers

If you are using a 3rd party database driver layer to connect to your database then you can enter the connection information on this page. The entered information is stored and used whenever you need to connect to your database while you are building projects in this workspace.

Driver Name

Enter the name of the database driver software you are using to connect to your database.

Connection String

Enter the connection string used to connect to your desired database.

Next Step

Setting up your Database


New Workspace Wizard - Setting up your Database

This wizard page describes the action to take once the New Workspace Wizard is finished in order to define each table and data dictionary from your target database.

If you are connecting to an SQL or ODBC database then you will need to run a special wizard that configures your communication layer to the target database for each table you wish to access.

In addition Visual DataFlex data dictionary classes should be defined for each table to define the business rules that will apply to your projects.

These tasks are performed by the Database Builder tool.


New Workspace Wizard - Selections Completed

Review the wizard selection that you have entered and then click the finish button to complete the New Workspace. The new workspace will be opened in the Studio.


Edit Menu

Undo

Undo last editing, or undo last operation.

When you are editing in the Code Editor this option will undo the last edit operation. When you are working in the Visual Designer, then this option will undo the operation.

Keyboard shortcut Ctrl+Z.

Redo

Redo the last undone operation.

When you are editing in the Code Editor this option will undo the last edit operation. When you are working in the Visual Designer, then this option will undo the operation.

Keyboard shortcut Ctrl+Y.

Cut

Cut text or object.

When you are editing in the Code Editor this option will cut the selected text to the clipboard. When you are using the Visual Designer, this option will cut the selected object(s) to the clipboard.

Keyboard shortcut Ctrl+X.

Copy

Copy text or object.

When you are editing in the Code Editor this option will copy the selected text to the clipboard. When you are using the Visual Designer, this option will copy the selected object(s) to the clipboard.

Keyboard shortcut Ctrl+C

Paste

Paste text or object.

When you are editing in the Code Editor this option will paste text from the clipboard. When you are using the Visual Designer, this option will paste object(s) from the clipboard as child object(s) of the currently selected object.

Keyboard shortcut Ctrl+V

Delete

Delete text or object.

When you are editing in the Code Editor this option will delete the selected text. When you are using the Visual Designer, this option will delete the selected object(s).

Keyboard shortcut Del

See Also

Menus


Text Menu

Bookmarks

Select this option to view a sub-menu of bookmark related options.

Toggle Bookmark

Select this option to bookmark the current line in the editor. If the line is already book marked, then the bookmark is removed.

Keyboard shortcut Ctrl+F2

First Bookmark

Positions the cursor at the first bookmark in the current file. The bookmarks are ordered top to bottom.

Previous Bookmark

Positions the cursor at the previous bookmark in the current file. The bookmarks are ordered top to bottom.

Keyboard shortcut Shift+F2

Next Bookmark

Positions the cursor at the next bookmark in the current file. The bookmarks are ordered top to bottom.

Keyboard shortcut F2

Last Bookmark

Positions the cursor at the last bookmark in the current file. The bookmarks are ordered top to bottom.

Clear All Bookmarks

Clears all bookmarks in the current file.

Find

Select this option to view a sub-menu of find related options.

Find...

Select this option to activate the Find dialog. The Find dialog is used to locate a piece of text in the current file. If the specified text is found, then the current cursor position is moved to the location of the searched text.

For more information see Finding Text.

Keyboard shortcut Ctrl+F

Find Previous

Select this option to find the previous occurrence of the previously searched text.

Keyboard shortcut Shift+F3

Find Next

Select this option to find the next occurrence of the previously searched text.

Keyboard shortcut F3

Find and Mark All

Select this option to bookmark each line containing an occurrence of the previously searched text.

Find Incremental Down

Select this option to begin an incremental search for text in the current file.

After activating an incremental search the mouse cursor will change shape displaying a search icon. While this icon is active, any text that you type will be added to an incremental search below the current cursor position. For example: If you type Ctrl+I, then "o", the editor will highlight the next occurrence of the letter "o"; if you continue typing "b","j" now the editor will highlight then next occurrence of the string "obj". Continue typing to narrow your search. Press ESC to cancel the incremental search mode.

Keyboard shortcut Ctrl+I

Find Incremental Up

This option works the same as Find Incremental Down except that the edit buffer is searched in the upward direction.

Keyboard shortcut Ctrl+Shift+I

Find and Replace...

Select this option to activate the Find & Replace dialog. The Find & Replace dialog is used to locate one or more occurrences of a piece of text in the current file and replace it with some other text.

For more information see Replacing Text.

Keyboard shortcut Ctrl+H

Find In Files...

Select this option to activate the Find In Files dialog. The Find In Files dialog is used to locate a piece of text in a set of different files. If the specified text is found, then each occurrence is listed in the Find Results window.

For more information see Find In Files and Find Results.

Keyboard shortcut Ctrl+Shift+F

Goto

Select this option to view a sub-menu of options related to moving the editor's current cursor location.

Goto Matched Brace

If the editor cursor is positioned on or next to a parenthesis character ( or ), then this option moves the cursor to the matching opening or closing parenthesis character.

i.e. If you have a line with the following characters…

move (left(sName+Right(sTitle,2), 1)) to sInitial

and the cursor is positioned over the first ( character, then the match parenthesis option will position the cursor over the last ) character.

This matching will work even when the expression is split over 2 or more lines. This option is useful in resolving parenthesis matching in expressions.

Goto Match Brace also works for matching pairs of scope keywords. e.g. Class/End_Class, Object/End_Object, Begin/End, etc.

Keyboard shortcut Ctrl+]

Goto Line

Positions the cursor at the specified line number.

Keyboard shortcut Ctrl+G

Next ToDo Item

Positions the cursor at the next ToDo comment. A ToDo comment is a special comment with the following format:

//ToDo: <some text>

Where:

<some text> is any comment text.

The ToDo comment is case insensitive.

Keyboard shortcut Ctrl+T

Goto Indentation

Select this option to place the cursor in front of the first word of indented text on the current line.

Toggle Record Macro

Select this option to begin recording a macro of editor commands in the currently edited file. Select this option once more when you want to finish recording your macro. When you stop recording the macro the Save Macro dialog is activated. This dialog will allow you to assign a keyboard shortcut and a name to the macro.

Your saved macros can be played back at any time by typing the keyboard shortcut that you associated with it.

Keyboard shortcut Ctrl+Shift+R

Comment\Uncomment

Select this option to convert the current line, or the currently selected lines, into comments. If the first character in the selected lines are already comment characters, then the comment characters are stripped.

Keyboard shortcut Ctrl+K

Toggle Whitespace

Select this option to toggle on or off the display of white space characters.

Keyboard shortcut Ctrl+Alt+T

Complete Word

Auto-completes the word you're typing by filling in the rest of the variable name, method name etc.

For more information see CodeSense.

Keyboard shortcut Ctrl+Space

Parameter Info

Displays a tooltip with information about the parameters for the current method call.

For more information see CodeSense.

Keyboard shortcut Ctrl+Shift+Space

List Members

Displays a context sensitive list of available source code commands, classes, data types, methods, variables, constants, objects, etc at the current cursor position.

For more information see CodeSense.

Keyboard shortcut Ctrl+J

Uppercase

Select this option to uppercase all selected text .

Keyboard shortcut Ctrl+Shift+U

Lowercase

Select this option to lowercase all selected text.

Keyboard shortcut Ctrl+U

Indent

Select this option to shift the text in the current line, or currently selected lines, right by one indent position.

Keyboard shortcut Tab

Outdent

Select this option to shift the text in the current line, or currently selected lines, left by one indent position.

Keyboard shortcut Shift+Tab

Select Line

Select this option to select all text in the line occupied by the current cursor.

Keyboard shortcut Ctrl+Alt+F8

Select Column Up

This option selects a vertical column of text above the current cursor position.

Keyboard shortcut Shift+Alt+Up

Select Column Down

This option selects a vertical column of text below the current cursor position.

Keyboard shortcut Shift+Alt+Down

Cut Line

Select this option to delete the current line and place it in the clipboard.

Keyboard shortcut Ctrl+L

Move Up

Select this option to move the current line down one line in the edit buffer. If multiple lines of text are selected then the entire selected block is moved.

Keyboard shortcut Alt+Up

Move Down

Select this option to move the current line up one line in the edit buffer. If multiple lines of text are selected then the entire selected block is moved.

Keyboard shortcut Alt+Down

Choose Editor Command

Select this option to activate the Choose Editor Command dialog. This dialog lists all commands that the Code Editor is capable of performing (including many that are not assigned to any menu or hot key). Select the desired command from the list and click OK to perform that command.

For more information see Configure Editor.

Keyboard shortcut Ctrl+D

See Also

Menus


Find

Use the Find dialog to search for text in the current file.

What

The 'What' text box specifies the text that you wish to locate. You may use a regular expression to specify the text being searched.

The combo list allows you to select from a list of recently searched text strings. This list is saved and restored the next time that you open the Studio.

Match whole word only

Check 'Match whole word only' if the Find text must match an entire word rather than a portion of some word. For example, if you are searching for "one" then the string "tone" would not produce a match.

Match case

Check 'Match case' if the case of the Find text is significant in the search. For example, if you are searching for "BEGIN" then the string "Begin" would not produce a match.

Regular expression

Check 'Regular expression' if you are using a regular expression in the Find text.

Direction

The 'Direction' group specifies the direction of the text search. 'Up' specifies that the text will be searched from the current insertion point to the top of the edit buffer. 'Down' specifies that the text will be searched from the current insertion point to the bottom of the edit buffer.

Find Next

Click the 'Find Next' button to find the next occurrence of the Find text.

Mark All

Click the 'Mark All' button to bookmark every occurrence of the Find text in one operation.

Cancel

Click the 'Cancel' button to close the Find & Replace dialog.

See Also

Code Editor


Find and Replace

Use the Find & Replace dialog to search for and replace a specific text string in the code editor.

Find

The 'Find' text box specifies the text that you wish to locate and replace. You may use a regular expression to specify the text being searched.

The combo list allows you to select from a list of recently searched text strings. This list is saved and restored the next time that you open the Studio.

Replace with

The 'Replace with' text box specifies the text that will replace the 'found' text.

The combo list allows you to select from a list of recent replacement strings. This list is saved and restored the next time that you open the Studio.

Match whole word only

Check 'Match whole word only' if the Find text must match an entire word rather than a portion of some word. For example, if you are searching for "one" then the string "tone" would not produce a match.

Match case

Check 'Match case' if the case of the Find text is significant in the search. For example, if you are searching for "BEGIN" then the string "Begin" would not produce a match.

Regular expression

Check 'Regular expression' if you are using a regular expression in the Find text.

Preserve Case

Check 'Preserve Case' to apply the text case formatting of the Find text to the Replace text for each occurrence found.

Replace in

The 'Replace in' group specifies the area of text being searched. 'Selection' specifies that only the currently selected text will be searched. 'Entire buffer' specifies that the entire contents of the editor will be searched.

Find Next

Click the 'Find Next' button to find the next occurrence of the Find text.

Replace

Click the 'Replace' button to perform a replace on the currently selected occurrence of the Find text.

Replace All

Click the 'Replace All' button to replace every occurrence of the Find text in one operation.

Cancel

Click the 'Cancel' button to close the Find & Replace dialog.

See Also

Finding Text Using Regular Expressions

Code Editor


Find in Files

Use the Find in Files dialog to search for text in multiple files.

Text to Find

Enter the text that you wish to locate. The multiple files search feature does not support regular expressions in the search string (as the Find text feature does).

The combo list allows you to select from a list of recently searched text strings. This list is saved and restored the next time that you open the Studio.

Case Sensitive

Check 'Case Sensitive' if the case of the Find text is significant in the search. For example, if you are searching for "BEGIN" then the string "Begin" would not produce a match.

Directories to Search

This is a list of directories containing the files to be searched. You may add, edit or remove directories from this list.

This list is saved and restored for each workspace. This means that when you change workspaces, the Studio will load the last saved directories to search for that workspace.

Use the checkbox column to enable or disable a directory in the list. This allows you to retain a list of common directories to be searched and turn on or off searching in those directories without having to edit the list.

When you select or click on a directory in the list you will see a combo list is available. This is a list of commonly searched directories for the current workspace. Use this list to add one of these directories to your search path.

Browse

Click the 'Browse' button to activate the folder browser dialog. This allows you to browse the directories on your system. The directory that you select in this dialog will replace the selected row in the 'Directories to Search' list.

If you type a partial directory path in the list before activating the browser, then the browser will use this partial path as a starting point.

Add

Click the 'Add' button to add a new empty row to the 'Directories to Search' list.

Remove

Click the 'Remove' button to remove the currently selected row from the 'Directories to Search' list.

File Mask

The 'File Mask' text box allows you to filter the files that will be searched by filename. Wildcards '*' and '?' are supported. You can enter multiple masks by separating them with semicolons.

The combo displays a list of common file masks for Visual DataFlex source files.

Search Where

To search in specific directories, select the Directories radio button. To extend the search to all subdirectories of the directories that you specified, also check the Search subdirectories checkbox.

To search in just those files that you currently have open in the explorer, select the Open Files radio button.

Search Subdirectories

Check 'Search Subdirectories' if you want the listed directories and their subdirectories to be searched.

OK

Click the OK button to perform the search. While the search is being performed, a progress message will display and you can click its Cancel button to stop the search.

When files are found that contain the search text, a panel listing the search results will appear. You can use this panel to browse the results and open one or more of the listed files.

See Also

Finding and Replacing Text

Code Editor


View Menu

Code

Select this option to activate the Code Editor for the current file. For more information see Code Editor.

Keyboard shortcut F7

Designer

Select this option to activate the Visual Designer for the current file. For more information see Visual Designer.

Keyboard shortcut F7

Workspace Explorer

Select this option to activate the Workspace Explorer window.

Keyboard shortcut Ctrl+1

Object Properties

Select this option to activate the Object Properties window.

Keyboard shortcut Ctrl+2

Code Explorer

Select this option to activate the Code Explorer window.

Keyboard shortcut Ctrl+3

DDO Explorer

Select this option to activate the Data Dictionary Object Explorer window.

Keyboard shortcut Ctrl+4

Class Palette

Select this option to activate the Class Palette window.

Keyboard shortcut Ctrl+5

Nudge Objects

Select this option to activate the Nudge Objects window.

Keyboard shortcut Ctrl+7

Arrange Objects

Select this option to activate the Arrange Objects window.

Keyboard shortcut Ctrl+8

Problem Resolution

Select this option to activate the Problem Resolution window.

Keyboard shortcut Ctrl+9

Output

Select this option to activate the Output window.

Keyboard shortcut Ctrl+Alt+O

Find Results

Select this option to activate the Find Results window.

File Navigator

Select this option to activate the File Navigator window.

Toolbars

Select this option to activate a submenu listing each available Studio toolbar. Select an option from this list to activate or deactivate one of these toolbars.

See Also

Menus


Workspace Explorer

Workspace Explorer provides an overview of the current workspace and displays the composition of the current project in that workspace.

Current Project

Before you can do any work in a workspace you must create one or more projects. One of these projects must be selected as the current project.

The current project is a very important property in the Visual DataFlex Studio. It specifies the project that you are currently working on. This project must belong to the current workspace. The current project gives the Studio a 'context'. Below is a description of how the current project affects different parts of the Studio:

When you compile a project in the Studio it is the current project that is compiled; When you run a project it is the current project that is run; When you are editing code, the Code Sense feature will apply information that is mined from source files belonging to the current project; the Visual Designer applies class definitions from the current project to know how to model objects; etc.

If your workspace contains more than one project then you can change which is the current project by:

  • Selecting a project from the Current Project combo list in the Workspace Explorer

  • Selecting a project from the project drop down list in the debug toolbar.

When you create a new project then that project becomes the current project for your workspace.

For more information see: Create New Project

Project Composition

The Workspace Explorer's treeview control displays the composition of component files for the current project. The component files are grouped by component category. Expand the project tree item to review the component categories belonging to your project.

For Windows applications the categories can be:

  • Views

  • Reports

  • Dialogs

  • Database Dialogs

  • Business Processes

  • Data Dictionaries

For Web applications the categories can be:

  • Web Service Objects

  • Web Browser Objects

  • Business Processes

  • Data Dictionaries

Expand each category tree item to review the list of component files in that category. The component files that are listed under each category may further be grouped according to the file's location. i.e. if you are utilizing sub-directories to group your project's source code then this sub-directory grouping will be reflected in the treeview.

For further information refer to Sub-directory Support and Component Files.

Determining a File's Component Category

For a file to be listed under one of the project's component categories there must be a use statement somewhere in one of the project files that reference it. The category it belongs to is determined by the class of the outer level object inside that file. For example, if the outer level object in File A is a dbView object then that file is categorized as a view . In the case of data dictionary components, it is the outer level class declaration that is inspected.

If a file that belongs to a project does not contain any categorized object or data dictionary class, then it is not listed in Workspace Explorer's project composition.

Context Menu Operations

Workspace Explorer can be used to perform various operations on tree items via it's context menu.

See Also

Workspace Explorer Context Menu

Docking Panels


Workspace Explorer Context Menu

Open

Opens the file associated with the selected tree item.

Double-clicking a tree item associated with a file is another way to open the file.

Add Component

Activates the Open File dialog. Use this to select one or more component files to add to the current project. You would use this operation to add "major" components such as views and reports to your project.

When you add a component to your project in this way the Studio will generate a use statement inside the appropriate object in your project.src file. The location of the use statement is determined by the type of project that you are modifying. For example:

If you add a Web Service Object component to a Web Application project then a Use statement for the component will be generated inside the project's cWebApp object.

If you add a Report component to a Windows MDI project then a Use statement for the component will be generated inside the project's ClientArea object.

Not all component categories can be added to the project in this way. Some components, such as database dialogs and data dictionary components are indirectly added to your project. For example, when you add a View project that view will itself use one or more data dictionaries and may also use one or more database dialog components.

Menu Generation

If you are adding view and report components to a Windows MDI project then special menu entries can be generated for activating the view or report object.

Menu generation will only occur if your Windows MDI project contains the correct DFCreate_Menu structure of menu objects and if "Auto Generate Menus when Adding Components" is checked in the Project Properties dialog.

Remove Component

Removes the selected component from the current project. The component file is not deleted but the use statement for that component will be removed from the project.src file.

Components that are used indirectly, such as database dialogs or data dictionaries cannot be removed in this way. Instead, you must edit the source code to remove the use statements from the appropriate component files.

Another way to remove components from the current project is to activate the Remove Components dialog. To activate this dialog select Remove Components from the Projects menu. This dialog displays a list of all components that are available for removal. This dialog supports multi-selection to remove more than one component at a time.

Add Project

Adds a project.src file to the current workspace's list of projects.

Whenever you create a new project in your workspace it is automatically added to the list of projects in the current workspace. However, if you copy a project.src file into your workspace then it must be manually added to the workspace's project list. The project.src must be located in one of the workspace source paths.

Remove Project

Removes a project from the current workspace's list of projects.

Project Properties

Activates the Project Properties dialog for the current project.


Object Properties

Use the Object Properties Panel to view and edit the properties of the currently selected object. The Object Properties Panel allows you to:

  • Change the name of an object

  • View and edit single parameter object properties

  • View and edit data binding settings in DEO objects

  • View and edit column properties in column based objects

Name

This is the object name of the object whose properties are being displayed. You can change the name of the object as desired to any valid name.

Class

This is the class name of the object whose properties are being displayed.

Properties Tab

The Object Properties tab dialog contains three pages:

  • Properties

  • Data Bindings

  • Column Properties

The Properties tab page and the Column Properties tab page both use a properties list control to display and edit properties

See Also

The Visual Designer

Docking Windows


Properties List Control

The Properties List Control

The Object Properties panel and Column Properties page both use a properties list control, which allows you to list, view and change properties. This control is specially designed for interacting with properties.

Property Grouping

Properties may be organized in two ways: Categorized or Alphabetical. Two buttons located at the top of the property list controls this organization.

Categorized

This ordering is selected by pressing the first button above the property list. When selected the properties are listed by categories. Within each group the properties are listed in alphabetical orders.

Each property is assigned a property category by setting the Category method meta-tag. Some of the categories that are defined are Access, Appearance, Behavior, Data, Error Handling, Help and Report.

If a property is defined directly in an object and not in a class, it is automatically categorized as “Object Defined”

When properties are grouped by category you can expand or contract any group of properties by double clicking on the category name or by clicking on the “+” or “-” symbols on the left hand side of the category name.

Alphabetical

This ordering is selected by pressing the second button above the property list. When selected the properties are listed in alphabetical order and category names are not listed.

The Properties List Divider

A divider separates the two columns. This divider can be adjusted by either dragging the divider or by pressing the ctrl-left and ctrl-right arrow keys.

Navigating the Properties List

The Tab and Shift Tab keys are used to navigate across columns.

If the keyboard focus is in the first column of the property list you can navigate up and down the list using navigation keys (up / down / home / end). If you enter text while within the first column the focus will switch to second column and the characters will be applied to that column.

Property Values

If the keyboard focus is in the second column the control assumes that you wish to edit the property value and the up / down / left / right arrow keys (including ctrl) are applied to the text in the selected cell.

If the column contains a list of choices a drop down list will be available. In addition to mouse selection, the list can be open and closed used selecting the Alt-Down and Alt-Up arrow keys. The up and down arrow keys, will navigate through the list of choices. Double clicking on the cell will also rotate through the list of options.

If you type in a new property value, pressing the Enter key or switching cells will apply the new value.

When a property value is changed the source code is immediately updated with the change. If a component displayed in the visual designer is impacted by this change, it will be updated as well.

String Values

Property string values are not listed with quotes. When a string value is changed the Studio will add the quotes to the source code automatically using either single or double quotes as required. Therefore you should not enclose quotes around a string value. If you do, the Studio will assume that the quotes should be part of the string’s value and embed them in your string.

If a string property is defined in source as either a constant or an expression (e.g. “Set Label to C_$Ok”, “Set Label to (AssignLabel(self))” ) then that property value will be displayed in the property panel as-is and editing of this value will be disabled. If you need to change this type of property value, you can do so directly by editing this source code. This restriction was created to avoid confusion that occurs when the Studio would attempt to determine if text is a constant or string literal. For example:

// This is a constant and must be maintained in the source

Set Label to C_$OK

// This is a normal string and can be maintained in the Property panel

Set Label to "C_$Ok"

Folded Properties

Visual DataFlex has a number of integer folded properties that require two values to be set but are returned as a single complex value (e.g. size, location). These properties are shown in a single line with the two values separated by a comma (e.g. 12;23) and can be edited as such. These lines can be expanded by selecting the “+” key to the left of the property name. When expanded both values are displayed and can edited by as individual values.

Folded are properties are defined by using the FoldedProperty method meta-tag in the class definition.

Color Properties

Properties that represent RGB colors contain a special drop down list that contains a choice of symbolic names for all of the standard and system colors. In addition, the first choice in the drop list “<Color Selector…>” invokes a color selector dialog allowing you to select any color you want.

A property is defined as being a color property by using the PropertyType=Color method meta tag in the class definition.

Initial Property Values

A property can be reset to its initial value by selecting a property, right clicking in the first column and selecting the “Reset Initial Value” menu item. Setting a property back to its initial value actually removes the Set statement from your source code.

Initial property values are defined when a default is defined in a property command or by the use of the InitalValue method meta-tag.

See Also

Object Properties

Column Properties


Object Properties - Properties

The Properties tab page displays all simple, non-column based properties. A property will appear in this list if it meets the following requirements.

  • The property is defined using the Property command, or, it is defined using the Procedure Set command with the MethodType=Property method meta-tag.

  • The property’s visibility is Public. This is controlled by the Visibility method meta-tag. By default, all properties are public.

  • The property is a design time property. This is controlled by the DesignTime method meta-tag. By default, all properties are design time.

  • The property is not obsolete. This is controlled by the Obsolete meta-tag.

  • The property is not a column-based property. This is controlled by the ColumnBased method meta-tag.

  • The property contains the correct number of parameters so it can be represented as a simple property. This includes:

  • The property contains a single parameter to the right of the “to” (e.g. Set Foo to Value) or the property contains a folded property to the right of the “to” (e.g. Set Size to 10 20).

  • The property contains no parameters to the right or the “to” or the property contains a single optional (ItemParameter=1) parameter to the right of the “to”.

The property tab page uses a properties list control to display and edit properties.

The Access Properties

Some components such as views, modal panels and reports contain a special category of properties called “Access”. These property names are “Deferred Object” and “Access Name”. As the space in the names should indicate, these are not real properties. This provides a mechanism for developers to create deferred views and CD_Popup views. It also provides a mechanism for providing the access method names for views.

This category and the properties in the category will only appear for objects that support these features.

See Also

Object Properties


Object Properties - Data Bindings

The Data Bindings tab page is used to bind a data entry object (DEO) to data. This is done by selecting a data dictionary object (DDO) server and a Table/Column data source.

This page is only used by “database-aware” controls (all system classes prefixed with “db”). If the selected object is not database-aware, then all the options on this tab page will be disabled.

If the object is a single value object such as a dbForm you need to assign a single data dictionary server and a single table/column data source.

If the object is a column based object such as a dbGrid you need to assign a single data dictionary server and a table/column data source for each column in the object.

In most cases, these assignments will already be correct. When data dictionary object structures are created using the DDO Explorer the DDO servers are properly assigned. If you create a new DEO by dragging and dropping a table/column from the DDO Explorer the new DEO object will contain the correct DDO server and table/column data source. If you create a DEO object from the Class Palette, you will need to assign these values yourself.

Setting the Server Data Dictionary Objects

The Server Data-Dictionary (Server DDO) object defines the objects connection point to a DDO in the data-dictionary structure.

The Server Data Dictionary is assigned by pressing the Prompt button and selecting the appropriate Data Dictionary from the list OF DDOs that are displayed in the Table Selector dialog.

Auto Assignment of DDOs

The list of available DDOs and the best DDO for an object is determined by your DDO structure. The Studio can determine if your current DDO choice is the best selection. The Studio makes this determination by evaluating the current DD structure’s DDOs, the Main-DD and any constraints. If the currently assign DDO is not considered to be the best server, the “Set Preferred Server” button will be enabled. Selecting this will select the best DDO for this object. Normally, the Studio’s choice will be the correct one.

The assignment of DDOs will usually only requires changes when the DDO structure changes. Often the best way to make sure that all of your DEOs use the correct DDO server is to select the “Set all DEO servers based on Main DD” option in the DDO Explorer.

READ THIS COMMENT: See Also: Data Dictionary Object Structure

Example 1: In an Order Entry component, the Order Number form should be connected to the Order Header data-dictionary as its server. This means that when a delete-record command is issued when the Order Number form has the focus, it will issue the following instructions to the data-dictionary structure "as an Order Header, delete." The data-dictionary structure will duly delete the entire order, including all of the appropriate order details, but not the customer that the order relates to.

Example 2: The Order Entry component again; this time we’ll look at the Customer Name form. Although the data-source is from the Customer file, the Server Data-Dictionary will again be the Order Header. This is because we would want the Customer Name to act as though it is logically part of the Order Header for all database save and delete operations.

Example 3: The same Order Entry component as in the first two examples. This time we are looking at the grid which displays Order Details. In this control, the orientation towards the data-dictionary structure changes. When we issue a delete record , we only want the current Order Detail to be deleted, not the whole order. Same thing for saves. Therefore, the Server Data-Dictionary for this control will be the Order Detail.

Recommended Reading: For further information on this topic refer to the "Business Rules and Data Dictionaries" section of Developing Database Applications.

Setting the Server Data Dictionary

A server data dictionary is assigned in one of two ways.

1. Direct Assignment: The server DDO can be directly assigned to the control by selecting a server from the Server/DataDictionary ComboForm. Technical Note: This sets the server property in the control object.

2. Indirect Assignment: If a server is not directly assigned, then it is assigned indirectly from its parent object. Often, the only explicit server in a view will be the server that is set in the dbView object. All nested controls will automatically infer their server by delegating this chore to a parent.

Setting the Data Source

The object’s data source specifies the source of the data that will be displayed in the control. This is usually a column in a database table but it can also be any valid DataFlex expression. The data source is represented in source code using the Entry_Item command.

You only need to set a data-source for controls that directly display data (such as dbEdit or dbForm). Container objects (such as dbView, dbContainer3d, dbGroup, etc.) do not use a data source. When a container object is selected, this data source group will be properly disabled.

If the selected object is single item based, (e.g., dbForm) a single form showing the object’s data source will be displayed.

If the selected object is column based, (e.g., dbGrid) a list of all available columns will be displayed.

The group labeled “Data Source” or “Grid Data Source” enables you to assign the control’s data source. Normally you will want to assign a table and column name using the tableName-dot-columnName format (e.g. Customer.Name). This is most easily accomplished by using the Prompt button. This will display the Table/Column Selector dialog, which contains a list of all available tables and their columns.

If you want the object to use an expression, you must enter this expression name manually including the parentheses. For example, the command line “Entry_Item (MyFunction(self))” would be entered as “(MyFunction(self))”.

Note that you do not use this page to create a new column in a grid. That is done in the Column Properties tab page. After a new column is created, you would then select this tab page and assign the new grid column a proper data source.

When you select a table and column using the prompt, the Studio will check to make sure that the selected column is appropriate. If you attempt to select a "child"-table column that relates to a parent table, the Studio will automatically choose the appropriate parent table and column for you.

See Also

Object Properties


Object Properties - Column Properties

The Column Properties tab page displays all column-based properties in column-based objects such as Grids and dbGrids. An object is considered to be column based if the class’s meta-data contains the ColumnBased=True tag. If the object is not column based this tab page will be disabled.

A column property will appear in this list if it meets the following requirements.

  • The property is defined using the Procedure Set command and the MethodType=Property method meta-tag is applied.

  • The property is a column-based property. This is controlled by the ColumnBased method meta-tag.

  • The property’s visibility is Public. This is controlled by the Visibility method meta-tag. By default, all properties are public.

  • The property is a design time property. This is controlled by the DesignTime method meta-tag. By default, all properties are design time.

  • The property is not obsolete. This is controlled by the Obsolete meta-tag.

  • The property contains the correct number of parameters so it can be represented as a column property. This includes:

  • The property contains a single parameter to the right of the “to” (e.g. Set Foo to Value) or the property contains a folded property to the right of the “to” (e.g. Set Size to 10 20)

  • The property contains one parameter to the right of the “to” or the property contains a single optional (ItemParameter=1) parameter to the right of the “to”.

The Column properties tab page uses a properties list control to display and edit properties.

Working with Columns

Selecting a Column

The columns group lists all columns in the in the grid. If the grid is non-data aware, the name of the grid’s Header_Label property is listed. If the grid is data aware, the name of the data-source (the column’s Entry_Item value) is shown in the grid.

Select any column in this list and all property values for that column will be displayed in the property list.

Moving Columns

Columns can be moved within a grid by selecting a column and pressing the “Up” button to move the column over to left and the “Down” button to move the column over to the right. These buttons are located to the right of the column list.

Adding a Column

The Add button to the right of the column selector is used to add a new column. The new column will be added as the last column. It can then be moved to another column position by selecting the “Up” and “Down” buttons.

Adding a column to a non data aware grid

If the grid is non data-aware the grid, the new column’s name can be set by setting the Header_Label property.

Adding a column to a data aware grid

If the grid is data aware, you will want to set the column’s data source by switching to the Data Bindings tab page and selecting a table/column value for new column.

Note that an alternate and easier method of adding columns to a data aware grid exists. Use the DDO Explorer and select one or more table/column values and drag them into the grid in the visual designer. This will do all the work for you. It will add the columns, set an appropriate column width, bind the column to the data source and provide an appropriate column header.

Deleting a Column

A column may be deleted by selecting a column and pressing the “Del” button, which is located to the right of the column list.

See Also

Object Properties


Table Column Selector

Depending where it is used the Table Column Selector dialog is used to either:

  • Select a data dictionary object or class

  • Select a table

  • Select a column from a table

If used to select tables or data dictionaries a list of all data dictionaries or tables will be listed. Select the desired item and confirm your choice by double clicking on the item or by pressing the Ok button.

If used to select a column from a table a list of all tables will be presented in a tree view. Expand the desired table and select the column from that table. Confirm your choice by double clicking on the item or by pressing the Ok button.

See Also

Object Properties


Code Explorer

Code Explorer displays an overview of the current source. A treeview displays a composition of all the major source elements in that file.

Use the Code Explorer to:

  • Review the contents and composition of your source files.

  • Navigate around your source file.

  • Select elements of you source file for modeling and editing.

  • Manipulate the order of object declaration in your source files.

Source Code Composition

The Code Explorer treeview displays the composition of the file currently being edited in the Code Editor or the Visual Designer. Each tree item represents some element of code in the file. Different types of code element are represented by different icons in the tree. Below is a list of the different element types and their icons:

- Class declaration

- Method declaration (i.e. Procedure or Function)

- Property declaration

- Object declaration

- Use statement

- Constant declaration (Define or #Replace)

- Struct declaration

- Menu command (i.e. DFCreate_Menu)

- Import_Class_Protocol

- ActiveX resource date

- Entry_Item list

- Entry_Item statement

- External function declaration

Code elements such as objects or classes that may contain other code elements are represented in the treeview using nested tree items. Expand a tree item to display the list of nested code elements.

You can filter which code element types will be displayed in the Configure Studio dialog. You can activate the Configure Studio dialog by selecting Configure Studio from the Tools menu or by selecting Configure Code Explorer from the Code Explorer's context menu.

Source Element Selection

Code Explorer can be used to coordinate other Studio views to the current file. Below are some common uses of the Code Explorer for code navigation and selection:

  • If you activate the Object Properties panel then select an object item in the Code Explorer, the object properties for the object you selected are displayed.

  • If you have the DDO Explorer active then selecting any object that contains a DDO structure in the Code Explorer will cause that DDO structure to be displayed in the DDO Explorer. This technique allows you to edit different DDO Structures when a view (such as a dbTabView) contains more than one DDO structure.

  • Double-clicking an element in the Code Explorer will activate the Code Editor and position the cursor on the line of code where the element is declared. Double-clicking actually synchronizes all views for the current file to the selected element.

Object Manipulation

Code Explorer can be used to change the order of objects declared in a source file.

To move an object select it in the Code Explorer then press Alt+Up Arrow or Alt+Down Arrow to move the object up or down relative to its sibling objects. The object declaration and all of its nested content will be moved above or below the relevant sibling object.

Code Explorer only supports moving an object relative to sibling objects of the same parent object, or root objects relative to each other.

You may also use the Move Object Up or Move Object Down context menu items to move an object.

Publishing Web Services or Web Object Interfaces

Code Explorer supports managing the published interface of your Web Services Objects or Web Browser Objects.

Methods belonging to a Web Service Object (WSO) or Web Browser Object (WBO) that are published are represented in the treeview with the following icon:

- Published methods.

You may change the published state of a WSO or WBO method by selecting it in the treeview then choosing Publish from the context menu (this toggles the method's published state).

See Also

Code Explorer Context Menu

Docking Panels


Code Explorer Context Menu

Code Explorer supports the following context menu options:

Locate In Editor

Activates the Code Editor and positions the cursor on the line of code where the selected code element is declared.

Object Properties

If an object declaration element is selected then this option activates the Object Properties panel and displays the properties of that object.

Bookmark in Editor

Adds bookmarks in the Code Editor where the selected element is declared. If the declaration spans multiple lines then one bookmark is placed at the beginning and another at the end of the declaration.

Open

If a Use statement or #Include statement element is selected then this option will attempt to open the referenced file.

Published

If a method declaration element belonging to a Web Service Object or a Web Browser Object is selected then this option toggles the method's published state.

Copy

Copies the selected element's code to the clipboard.

Move Object Up

If an object declaration is selected, then this option will attempt to move the declaration above the previous sibling object declaration.

Move Object Down

If an object declaration is selected, then this option will attempt to move the declaration below the next sibling object declaration.

Configure Code Explorer

Activates the Configure Studio dialog with the Code Explorer tab to the front.

See Also

Code Explorer


DDO Explorer

The Data Dictionary Object (DDO) Explorer displays an overview of the data dictionary objects in the current file.

DDO Explorer Functionality

Use the DDO Explorer to:

  • Build the structure of data dictionary objects (DDOs) that serve data to a structure of data "consumer" objects in the current file.

  • Review or modify the structure of DDOs.

  • Create data entry objects (DEOs) binding windows controls to table column data via data dictionary objects.

The DDO Explorer provides this functionality via two branches of the treeview:

DDO Structure Editor

The structure editor is a "smart" tool that allows you to examine and manipulate the data dictionary structures for data aware components in your project. It uses the Visual DataFlex Application Framework principles to create proper DDO structures.

DDO Column Selector

The column selector allows you to drag and drop columns into the Visual Designer.

DDO Host Objects

Only files with object declarations that support nested data dictionary objects can utilize DDO Explorer. Views and Web Objects are examples of files with objects that support DDO structures. These files are also referred to as "data aware components".

When the current file does not support DDO structures then DDO Explorer will display the following message: "No DDO Host object selected".

If you are editing a file that has multiple structures of objects where one (or more) structure can host DDOs and other structures cannot host DDO structures, then you must use the Code Explorer to select a DDO Host structure to enable DDO Explorer.

See Also:

Database Builder

DDO Structure Editor

DDO Column Selector


DDO Structure Editor

The DDO Structure Editor

The first root item in the DDO Explorer's treeview comprises the DDO Structure Editor.

The data dictionary structure is displayed in a tree. This display is designed to present all the information required to create and review a DDO structure.

Each table in the DDO structure is presented in the first level of the list. Since access to each table is wrapped in a data dictionary object, the names of these data dictionary objects are shown.

By expanding a table in the list, you can see a list of all DDO server-to-server connections (displayed in the child table), and any child-to-parent constraints.

Different elements of a DDO structure are represented by different icons in the tree. Below is a list of the different element types and their icons:

- DDO Structure Editor root.

- Table (DDO).

- Table (Main DDO).

- Server DDO.

- Constrain to table.

The DDO Structure Editor supports various operations though it's Context Menu

Ensure Your Data Dictionary Subclasses Are Created and Correct

Before creating a DDO structure, you should make sure that your data dictionary subclasses have been created for each table, and that they are proper. In particular, you want to make sure the expected server-to-server connections are properly defined in your data dictionary classes. Each data dictionary class should contain a list of expected server (parent) data dictionaries and a list of client (child-table) data dictionaries. (Use the Database Builder tool to create the data dictionary classes for each table in your database).

The Studio will analyze your data dictionary subclass and use these required connections to determine how a DDO structure should be connected.

Related Topics: Data Dictionary Structures

Determine the Main DDO

Each component that binds to data from a table should be assigned a main DDO. This is the focal point for database operations that are performed in this component.

In some cases, the main DDO will be the child-most table in a relational structure (e.g., an Inventory main data dictionary with a Vendor parent).

In other cases, the main DDO will be in the center of data dictionary structure (e.g., an Order Header main DD with a Customer parent DD and an Order-Detail child DD).

When a main DDO has child-table DDOs, these children are almost always constrained to the main data dictionary (e.g., the Order Detail can only show records that are related to the current Order Header). The Studio uses this knowledge to determine how child/parent constraints should be enforced. When a main DDO is assigned or changed, the child/parent constraints in the DDO structure are reassigned.

A general rule of thumb in determining the Main DDO for a component is to ask: what is the main data processing purpose of the component? e.g. For a customer maintenance view, the customer DDO is the main DDO. For an order entry view, you want to display one order header at a time; you also want to display only order details relating to the current order header. This means that the Order Header table will be the main DDO.

DDO Explorer as a Learning Tool

You are encouraged to use this as a learning tool. In particular, watch how changing main DDOs alters the child/parent constraints. When you can predict how the changing of the main DDO will change constraints, you have mastered an important concept. Create different structures and look at the source code that is generated. Finally, look and see how data entry control server assignments are made (the server property). The use of direct and indirect (from a parent container) server assignments and the fact that servers are not assigned based solely on the table & column value of a control is a source of potential confusion. Study how the Studio does this.

Further Reading

For further information on this topic refer to the "Business Rules and Data Dictionaries" section of Developing Database Applications and "Building Tables and Data Dictionaries" in the Database Builder utilities help.

See Also

DDO Structure Editor Context Menu

DDO Explorer

DDO Column Selector


DDO Structure Editor Context Menu

Add DDO

Use this option to add data dictionary objects to your structure. Often, this will be the only option you need to select. This activates the DDO Selector dialog.

Only data-dictionaries that are not already selected for the current component will be shown. When you select a DDO, that DDO and its entire set of parent DDOs will be added to the DDO structure.

When a DDO is added to a structure, all DDO-to-DDO server connections are automatically made (this is represented in your code with Set DDO_Server statements). In addition, child-to-parent constraints are assigned based on the structure’s main DD. This is represented in your code as the Set Constrain_File statement.

If a main DDO has not yet been defined, you will be asked if you wish to make the selected DDO the main DDO. This is done to remind you that you should select a main DDO before leaving this tool.

The best way to build a DDO structure is to first select the data dictionary to be the main DDO. This will add this table and all parent data dictionaries to your structure. Next, you should add any required child DDOs. If this order is followed, the Add DDO button should be the only button you need to select in this panel.

Add/Change Constraint

This option lets you create or clear a child-to-parent constraint. Select the child-table DDO in the tree view list and select this option. This activates the DDO Selector dialog. A list of all DDOs (including<none>) will be presented. Select the <none> option to clear the constraints for the highlighted table.

For more information regarding constraints see: Constraints and Filters.

Important: You will normally never use this option. It is provided to give you complete control over your DDO structure. This lets you create any type of structure you want, including invalid ones. If you use this option, you should be careful. The Studio is no longer helping you.

Set this DDO as Main DD

This option lets you select the main DDO for a component. Every component that has a data dictionary structure should have a main DDO. Select the table DDO that you wish to make the main DDO and select this option.

When a main DDO is assigned, the parent/child constraints in the DDO structure are reassigned around the main DDO. This is a desired behavior because one of the main purposes of setting main DDO is to properly assign constraints.

If you need to create custom child/parent constraints in your structure, you must first set the main DDO and then set the custom constraints.

Remove Main DD

This option lets you remove the Main DDO setting for your DDO structure. Select the main table DDO in your structure then choose this option.

Important: You will normally never use this option. It is provided to give you complete control over your DDO structure. This lets you create any type of structure you want, including invalid ones. If you use this option, you should be careful. The Studio is no longer helping you.

Set all Constraints based on Main DD

This option analyzes the current DDO structure and constrains all child DDOs of the structure's main DDO. i.e. constrains all DDO's whose DDO Server is the Main DDO.

For more information regarding constraints see: Constraints and Filters.

Set all DEO servers based on Main DD

This option analyzes the component and sets all client objects of the DDO Structure so that the structure's main DDO is the DDO that is the clients' data server.

Delete DDO

You may remove any DDO by selecting the DDO in the tree view and choosing this option. This will remove only the selected DDO. After doing this, you may no longer have a DDO structure that is properly connected.

Important: You will normally never use this option. It is provided to give you complete control over your DDO structure. This lets you create any type of structure you want, including invalid ones. If you use this option, you should be careful. The Studio is no longer helping you.

Delete Entire DDO Structure

Removes all data dictionary objects from the structure.

Add a new Parent DDO relationship

You may manually connect a child-table DDO to a parent-table DDO using this option. Select the child-table DDO in the tree view and choose this option. This activates the DDO Selector dialog. A list of all DDOs in the structure will be presented. Select the desired parent DDO from the list.

For more information see: DDO Structures.

Important: You will normally never use this option. It is provided to give you complete control over your DDO structure. This lets you create any type of structure you want, including invalid ones. If you use this option, you should be careful. The Studio is no longer helping you.

Delete Relationship

A DDO-to-DDO connection may be removed by selecting this button. Select the DDO server in the tree view and choose this option.

Important: You will normally never use this option. It is provided to give you complete control over your DDO structure. This lets you create any type of structure you want, including invalid ones. If you use this option, you should be careful. The Studio is no longer helping you.

Locate DD Object

Selects the highlighted DDO in the Code Explorer and moves the editor cursor to the first line of the data dictionary object declaration in source code.

Locate DD class

Opens the file that contains the selected DDO's class declaration and positions the cursor on the first line of the declaration.

See Also

DDO Structure Editor


DDO Selector Dialog

Use the DDO Selector dialog to add data dictionary objects to your structure.

Only data dictionaries that are not already selected for the current component will be shown. When you select a DDO, that DDO and its entire set of parent DDOs will be added to the DDO structure.

When a DDO is added to a structure, all DDO-to-DDO server connections are automatically made (this is represented in your code with set DDO_Server statements). In addition, child-to-parent constraints are assigned based on the structure’s main DD. This is represented in your code as the Set Constrain_File statement.

If a main DDO has not yet been defined, you will be asked if you wish to make the selected DDO the main DDO. This is done to remind you that you should select a main DDO before leaving this tool.

The best way to build a DDO structure is to first select the data dictionary to be the main DDO. This will add this file and all parent data dictionaries to your structure. Next, you should add any required child DDOs. If this order is followed, the Add DDO button should be the only button you need to select in this panel.

Select

Click the 'Select' button to add the currently selected DDO to the DDO structure and close the dialog. You can also perform this action by double clicking a DDO in the list.

Cancel

Click the 'Cancel' button to close the Select DDO dialog without adding a DDO.

See Also

DDO Structure Editor

DDO Explorer


DDO Column Selector

The second root item in the DDO Explorer's treeview comprises the DDO Column Selector. The Column Selector simplifies building components that display data from a database. It enables you to create data-aware controls for the columns of a database table by dragging their names from the Column Selector’s list and dropping them onto the component at their desired locations in the visual designer.

Different elements of the column selector are represented by different icons in the tree. Below is a list of the icons and their meaning:

The Table List

The Column Selector displays the object name of each data dictionary that the component is using. If you are creating a new component that has no data dictionaries then the list is empty.

You can add or remove DDOs from the list via the DDO Structure Editor.

If you double-click the branch representing a DDO in the list then it opens to display all of the columns that belong to the DDO's table.

Below is a key to the icons used in the DDO Column Selector:

- DDO Column Selector root.

- Table (DDO).

- Table (Main DDO).

- Column.

Selecting Columns

To select a column to be dragged onto your component, simply click the checkbox next to the column names.

You can select multiple columns from multiple DDOs in the list.

Dragging and Dropping Columns

After you have selected all the columns to create, click and hold the left mouse button over any of the selected columns. Move the mouse over to the Visual Designer view of the component to where you want to drop the first column, and release the mouse button. The columns will be dropped in the order of the list, not the order you selected them.

Notice that when you drag the mouse, the cursor will indicate whether you can drop the control. If it is a cross-hair, you can drop the control, and it will be located at that point. You cannot drop a data-aware control into an non-data-aware container; you will be warned if you make this mistake.

If the columns are dropped onto a dbGrid or dbList control then no controls will be created. Instead the columns will be added to the existing dbGrid columns.

Automatic Class Selection

The Studio automatically determines the type of control to create for each column, by analyzing the column's data dictionary. The data dictionary information is analyzed in the following way for each column (in order of precedence).

  1. If the column’s Visual Control property is set, then this is used as the control type.

  2. If the column’s Checkbox property is set, then a dbCheckBox type control is created.

  3. If the column has a Validation Table or has its Simple Validation property set, then a dbComboForm type control is created.

  4. If the column type is Text then, a dbTextEdit type control is created.

  5. All other columns will use dbForm type controls.

These factors are listed in order of precedence (i.e., if the first factor is used then the remaining factors are ignored, etc.).

If the columns are dropped onto a dbGrid or dbList control then no controls will be created. Instead the columns will be added to the existing dbGrid columns.

Automatic Labels

All of the controls created by the Column Selector contain a Label property that sets a descriptive label for the control. When dragging and dropping columns, the Studio will automatically set the Label property for you, based on information analyzed from each column’s data dictionary. The data dictionary information is analyzed in the following way, (for each column in order of precedence).

dbGrid or dbList type controls

  1. If the table column’s Short Label property is set, then this is used as the grid column heading.

  2. If the table column’s Long Label property is set, then this is used as the grid column heading.

  3. The column Name is used (it will be upper/lowercase formatted and all "_" characters replaced by " " (a space).

All non-list type controls (dbForm etc.)

  1. If the columns Long Label property is set, then this is used as the label.

  2. The column name is used (it will be upper/lowercase formatted and all "_" characters replaced by " " (a space).

These factors are listed in order of precedence (i.e., if the first factor is used then the remaining factors are ignored, etc.)

Automatic Sizing

All controls that are created by the Column Selector will have their size property (height and width) automatically set, based on information that is analyzed by each column's data dictionary. The following column data will affect the initial size of the control.

  • Column Length

  • Column Data Type

  • Capslock column option

Automatic Parent File Selection

A common error when designing components, is to drag and drop a column from a child table that is directly related to a parent table. For example, dropping the Order Number column from the Order Details table instead of the Order Header.

When you are using the DDO Column Selector, the Studio automatically corrects this error.

Using DEO Subclasses

You can override which class will be created when dragging columns from the DDO Column Selector. For example, you may have created a subclass of dbForm that you want to use whenever dragging and dropping from the DDO Column Selector.

To override the default classes select Configure Workspace from the tools menu and edit the appropriate classes on the Class Preferences tab.

See Also

The Visual Designer

DDO Explorer

DDO Structure Editor

Setting a Column's Visual Control


Class Palette

The Class Palette allows you to drag and drop various objects onto a component's visual design canvas. It is also used to determine which libraries are used by the workspace.

The Context Menu

The class palette has an extensive context menu that allows you to:

  • Control how classes are grouped and ordered within the palette

  • Add, remove and duplicate the classes that appear in the palette

  • Add and remove libraries from a workspace

  • Refresh and rebuild the classes that appear on the class palette

See Class Palette – Context Menu for more information on these features

Dragging and Placing Controls

The primary purpose of the class palette is to drag and drop objects onto a component’s visual designer. The classes are maintained in a grouped list. Each group may be expanded or collapsed by clicking on the group bar. By default the first group is always expanded and all other groups are closed. Clicking on any closed group expands it showing all classes in the group. Clicking on an opened group collapses it.

To drag and drop a control, click and hold the mouse cursor over the name for the desired class of control. The button will depress and the mouse cursor will change as you move it. The cursor has two shapes, "No Enter," meaning you cannot drop the control at that point, and "Cross-Hairs," meaning that you can drop the control. To drop the control, simply release the mouse button at the desired location, and the control will have its top-left location at the cross-hairs. The size of the control will be determined automatically.

This drag and drop behavior is the standard behavior of the class palette. The context menu allows you to select an alternate “Rearrange Class Palette” mode where classes can be moved within the class palette itself.

Classes Supported within the Studio

The classes, their grouping and their order will vary depending on the configuration of any workspace. By default, the system classes are placed in the palette with the following groups – Base Controls, Base Containers, Data Controls, Data Containers, Dialogs, Internet and Others. Within each group the classes are listed in alphabetical order.

The default groups are listed below, along with the default classes offered in each group.

Base Controls

The Base Controls group contains general purpose windows visual controls. These controls are not designed to represent data from a database table.

BitmapContainer | This control provides a means for enabling users to select and display bitmap graphic files.
Button | This control is used to create a representations of a button that, when pressed by users, produce a specific action with an immediate response.
cAnimation | The control is used to display an animated image.
CheckBox | This control is to toggle some Boolean value.
ComboForm | This control combines the functionality of the Form control with that of a standard Windows drop-down list. This class is used when it is appropriate to supply a form with a list of static options.
cProgressBar | This control is used to visually displays numerical values from a database using a progress bar style control.
cRichText | This control allows the user to enter and edit RTF (rich-text format) text.
cTextEdit | This is a multi-line text-based control allows the user to enter and edit text. The control automatically wraps words between lines and has a vertical and horizontal scrollbar.
Form | This control allows the user to enter one-line of data.
Grid | This control is used for creating multi-row, multi-column entry lists.
LineControl | This control is used to display a horizontal or vertical line
List | This control is used to display a list of values in a single column.
Radio | This control is used within a RadioGroup container, to show the current selection from a group of mutually exclusive options.
SpinForm | This control provides a form that users can edit, that displays an integer that can be "spun" through a range of values.
TextBox | This control is used to display a text in a container. You may not need to use this class too often, as the Label property of most classes provides the functionality automatically.
TrackBar | This control visually represents numerical values using a track bar style control.
TreeView | This control displays a hierarchical list of items, such as the headings in a document, the entries in an index, or the files and directories on a disk.

Base Containers

The Base Containers group contains controls that are containers designed to hold other non data-aware controls.

Container3d | This control is a general-purpose container that has a 3-D appearance.
Group | This control is used to contain non data-aware controls. Visually drawn with a 3d-line border with a label in the top left corner.
ModalPanel | This control provides modal popup panels.
RadioGroup | This control is used to group Radio objects within a Group.
TabDialog | This control is a container that holds TabPage objects. It is very useful for conserving screen space.
ToolPanel | This container class creates panels that are not listed on the Windows task list.
View | This control provides a "basic" (non DEO) MDI view.

Data Controls

The Data Controls group contains visual controls that are data-aware and are used to display data from a database.

cDbRichText | This control allows the user to enter and edit RTF (rich-text format) text connected to a column in a database table.
cDbTextEdit | This control allows the user to enter and edit text connected to a column in a database table.
DbBitmap | This control stores the name of a bitmap file in a database column and displays the bitmap.
DbCheckBox | This control displays Boolean-style database data in a checkbox.
DbComboForm | This control combines the functionality of the dbForm class with that of a standard Windows drop-down list. This class is used when it is appropriate to supply a dbForm with a list of static options.
DbForm | This control displays database data on one line.
DbGrid | This control is a multi-row, multi-column object to enter data into.
DbList | This control is a multi-row, multi-column object to view data in.
DbSpinForm | This control displays database integer data and permits the incrementing and reduction of available values.
DbTrackBar | This control visually represents numerical values from a database using a track bar style control.

Data Containers

The Data Containers tab page contains controls that are containers designed to hold other non data-aware controls.

dbContainer3d | This control is a container with a border that makes it visually appear raised.
dbGroup | This control is a container with a label in its top-left corner.
dbModalPanel | This control provides a modal container for selection lists (dblist) and other DEOs.
dbRadioGroup | This control is a data-aware container that uses Radio Objects to show choices from a database.
dbTabDialog | This control provides pages to place data-aware controls on.
dbTabDialogView | This control provides pages to place data-aware controls where each page supports a separate DDO tree.
dbView | This control creates view objects.

Dialogs

The Dialogs group contains windows dialog controls, such as the Open dialog, Save dialog, Font dialog, etc.

ColorDialog | This class provides access to the Windows color selection dialog.
FontDialog | This class provides access to the Windows font selection dialog.
PrintDialog | This control provides access to the Windows Print dialog.
OpenDialog | This control provides access to the Windows file-open dialog.
SaveAsDialog | This class provides access to the Windows file-save dialog.

Internet

The Internet group contains all Internet related controls such as Web Report, FTP Transfer, HTTP Transfer, XML Transfer, etc.

cAutoWebReport | This class can create quick prototype reports based around the main file of a cWebBusinessProcess object.
cFtpTransfer | This class implements FTP client-side operations.
cHttpTransfer | This class implements HTTP client-side operations.
cWebReport | This class creates HTML reports to be used with Web Applications.
cWmlReport | This class is a subclass of cWebReport that is customized for WML.
cXmlHttpTransfer | This class provides an easy mechanism for sending and receiving XML documents via Http.

Others

The Others group contains...

Array | This class is used to create a collection of values which are stored and accessed via item numbers. Note: Visual DataFlex also supports Array Data Types.
BusinessProcess | This class contains and executes the statements to perform some batch process on an application's database.
cApplication | This class encapsulates methods and properties that are essential to the running of any Visual DataFlex application.
cCrystal | This class is used to represent a Crystal Report in your windows project.
cCrytsalActiveXReportViewer | This class creates an report viewer that is used to view Crystal reports.
cHtmlHelp | This class is used to provide HTML help to your windows application.
cImageList | This class defines a collection of images of the same size, each of which can be referred to by its index.
cIniFile | This class provides access to Windows INI (configuration) files.
cMapiHandler | This class wraps the Microsoft mail API for sending mail, reading received mail and sending documents.
cObject | This class is the fundamental class from which all classes are derived. You can use this in your applications to build some generic object which you can add properties and methods to.
cWinReport2 | This class provides the ability to use WinPrint to build graphical reports (different font styles, font weights, font orientations, graphics, etc.).
DfTimer | This class is used to trigger an event after a certain amount of time has passed.
Set | This class assembles and maintains a set of unique values.

See Also

Importing Active-X Controls

Web Service Client Class Generator

Docking Panels


Class Palette - Context Menu

The Class Palette supports various operations though it's Context Menu:

Rearrange Palette Mode

The class palette operates in two modes. In the normal mode, the classes in the palette can be dragged and dropped into the visual designer. The “Rearrange Palette Mode”, which is selected via this context menu option, is used to rearrange the groups and classes within the palette.

When in rearrange mode, you can move groups and classes inside of the palette via drag and drop. This makes it easy to customize the order of your class palette.

When you are finished reordering your class palette, you should again select this context menu option to exit this mode.

Sort classes within all groups

This option reorders the classes within all groups in alphabetical order. It does not reorder the groups themselves.

Hide Classes defined in the system class list

This option hides all classes that are defined in the system class. Selecting this will show only non-system classes – the classes that are defined in libraries and in the workspace. You would probably only want to use this option if you have created subclasses for all system classes.

Add Class to palette

This option is used to add an existing class to the class palette. This will invoke the “Add a new class to the class palette” dialog, which will allow you to select the class to be added to the palette.

The new class will be added to the group that this option was selected within. It will be placed at the end of the group. You can use the Rearrange Palette Mode to move this class where you wish.

Duplicate Class in palette

This option is used to make a duplicate class entry. The entry will be placed at the end of the group and you can use the Rearrange Palette Mode to move this class where you wish. This can be used to new groups of classes (e.g., Favorites) which contains classes that are already defined elsewhere in the class palette.

Create/Load Class DFO file

This loads the class’s object preference file (DFO file). This is a file that contains code that is created any time this object is created. You may load this file and customize according to your needs.

Note that the DFO files for system classes cannot be directly modified within a workspace. If you attempt to load a system DFO file you will be informed that this is a system class and then given the opportunity to create a copy of this DFO file in your current workspace where this copy could be edited. This changes will only be applied to the one workspace and not to other workspaces using the system class. However, if the workspace is a library and the change is made within the library’s workspace, all workspaces using this library will also use the modified DFO file.

Class Properties

This option invokes the "Class Palette Item Properties" dialog showing information about this class entry – package file, class name, group name and icon name.

Add Group

This option allows you to create a new group. A dialog will be invoked asking to enter a new group name. After creating the group, you can use the Rearrange Palette Mode to move this group where you wish and populate it as needed.

For example, you may wish to create a new group named “Favorites” and place this at the top of your class palette. You could then create duplicates of your most commonly used classes and place them in this group. Since the first group is by default always opened, you will always have quick access to your most commonly used controls.

Remove Class from palette

This option removes the selected group from your class palette. This does not delete the class – it only removes it from the class palette. Once removed, you can always add the class again.

You will be asked to confirm the class removal before the class is actually removed.

Remove Group from palette

This option removes the selected group and all of the classes within this group from your class palette. This does not delete any of the classes – it only removes them from the class palette along with the group. Once removed, you can always add the group and classes again. Adding these back could be a tedious process, so you are encouraged to use this feature carefully.

Before a group is removed you will be shown a list of all the classes that will be removed and asked confirm this action.

Add/Remove Libraries

This option invokes the “Library Maintenance” dialog. This is used to determine which libraries will be used by the workspace. This dialog allows you to add or remove a library.

Note that a library is just a workspace that has been designed to be used as a library. Like any workspace, a library contains a class list and it is maintained the same way all workspace class lists are maintained. When a library is added to a workspace, all classes defined in the library class list will be added to the workspace’s class list. This initial grouping and ordering of these new classes is determined by library’s class list.

When a library is removed from workspace, all classes defined by that library will be removed from the workspace’s class list.

In addition to responding to additions and removals of entire libraries, any changes in an existing library (i.e., adding a new class or removing a class in that library) will also be reflected in any workspace that uses the library.

Rebuild all Libraries

This rebuilds the class list making sure that all classes defined in the system class list and all classes defined in library class lists are placed in the current class list. It does this by removing all system and library classes from the current class list and then import all of the classes defined in the system and library class lists.

This only operates on system and library classes. This does not add or remove any of the classes that were added directly by the workspace. In other words, any class that was added to the class palette as part of Add Class to Palette operation or any of classes created as part of the Create New Class operation (Add a Class, Multi-Classes, Client, Web Service classes, COM classes), will not be changed.

This essentially restores the class palette’s list of system and library classes and may be useful if your class list is need of “starting over”.

Refresh Class list

This option performs the same operation that occurs every time a workspace is loaded. The Studio will first check to see if the workspace’s class list is up to date. If classes were added or removed in the system class or a library class, the workspace class list will be updated with this change. This is referred to as a class list reconciliation. If there are any reconciliation changes these will be reported in the output panel.

This process also checks that all of the classes in the list are valid by checking that each class can be found in the file associated with the class. Any errors will be reported in the output panel.

If class list errors are listed in the output panel, either as part of loading a workspace or as a result of this operation, you will want to fix these errors. After fixing the errors, you can again select “Refresh Class List” to confirm that the errors no longer exist.

See Also

Docking Windows


Add a New Class to the Class Palette

This is invoked by selecting the “Add class to palette” option from the class palette context menu. This option allows you to add an existing class to the class palette.

The class should already be defined and a class package file should already be created. This option does not create a new class. It adds an existing class to the class list.

The following options allow you to select the class.

Package File

Select the source file that contains the class definition you wish to add. You can search for the source file by selecting the prompt button.

Tip

Before invoking this dialog, load the file that contains the class and make it the Studio’s current file. The default package name in this form will be the Studio’s current file. If you first find the file that contains the class and make sure it is the current file, the package file will already contain the correct name.

Class Name

If the selected package file contains only one class definition, the name assigned to that class is displayed.

If the selected package file contains multiple class definitions, use the combo to select the class you want to add. You can repeat this process to add as many of the class definitions to the palette as you wish.

You are allowed to enter a package file that does not exist and a class name that is not defined in the file. This was done so you can first add the class/file before actually creating it. This is unusual and if you do this, be careful.

Group Name

Enter the name of the Group that you want the class displayed in.

You can enter a new name if you wish. If you do enter a new group name, that group will be automatically created for you in the class palette.

Icon Name

In most cases you will want to leave this blank so that the class can inherit the icon from the appropriate super class.

If you do not want to inherit the icon from the super class, use the browse button to find the icon or bitmap you want to associate with the class you are adding.

OK

Click the OK button to add the new class.

See Also

Class Palette

Class Properties

Add Group

Add / Remove Libraries


Enter a new class palette group name

This is invoked by selecting the “Add Group” option from the class palette context menu. It allows you to create a new group for your class palette.

Enter a name for a new group and select Ok.

See Also

Class Palette

Add Class to Palette

Class Properties

Add / Remove Libraries


Class Palette Item Properties

This is invoked by selecting the “Class Properties” option from the class palette context menu. This option displays the class list information associated with the selected class. It displays the following:

Package File

This is the name of the package file that contains the class definition.

Class Name

This is the name used to define the class.

Group Name

This is the name of the group in the Class Palette that contains the class.

Icon Name

This the name of the Icon displayed next to the class name on the Class Palette.

OK

Press OK to close this dialog

See Also

Class Palette

Add Class to Palette

Add Group

Add / Remove Libraries


Library Maintenance

The Library Maintenance dialog is used to add and remove libraries from a workspace. Libraries provide a mechanism for easily adding a library of classes to a workspace.

When a library is added to a workspace the following happens:

  • The library’s source paths (AppSrc) will be added to the workspace’s source paths making all library source files available to the workspace. Most often the library source files will contain classes.

  • If a library itself contains additional libraries, all of those libraries paths will be added to the workspace’s source paths.

  • All classes in the library’s class list will be into the workspace’s class list.

  • Any time the library’s class list changes, the workspace’s library will be updated with the change

Libraries are a very powerful feature of the Studio. See Libraries for more on how this can be used.

This Library Maintenance dialog is invoked by selecting the “Add/Remove Libraries” option from the class palette context menu.

The Library Maintenance dialog contains a list that shows all libraries that are part of the workspace. Each library is identified by the library’s .sws configuration file. Note that a library is itself a workspace and is identified the same way any library is identified. Libraries are added and removed from this list by selecting the appropriate button.

Add Library

This button is used to add a library to a workspace. When selected, an open file dialog will be presented. You select a library in the same manner you would select a workspace - search for and select the desired .SWS configuration file.

When the configuration file is selected, the Studio will determine if this library can be identified using a relative path. If it is, you will be asked if you wish to add the library to you workspace using this relative a path. In almost all cases, this is recommended. Using relative paths makes it much easier to maintain workspaces and their libraries on multiple computers. As long as the relative paths between workspaces (i.e., the main workspace and the library workspaces) are maintained on all computers they can be moved to any drive and location you desire.

Remove Library

This button removes a library from a workspace. Select the library you wish to remove and press this button. You will be asked to confirm your action.

Removing a library from a workspace will remove all of the classes in the class list that were defined in this library.

Note that removing a library does not delete or in any way change the actual library. It simply removes it from your current workspace.

Ok

This option commits any changes and closes the dialog.

Of Special Note

If you added any new libraries, the workspace’s Class Palette will be updated. Any class defined in the library’s Class Palette will be added to the workspace’s Class Palette.

If you removed any libraries, any of the library classes that were added to the workspace’s Class Palette will be removed.

The workspace’s make-paths will be adjusted if libraries are added or removed.

See Also

Class Palette

Add Class to Palette

Class Properties

Add Group


Nudge Objects

The Nudge Objects panel is used to manipulate the size or position of one or more objects in the Visual Designer.

Moving Objects

Select the object or objects in the Visual Designer that you wish to change, then select the "Move" radio item. Next select the number of dialog units that you wish to move at a time in the spin form. Move the objects up, down, left or right by clicking the appropriate buttons.

Resizing Objects

Select the object or objects in the Visual Designer that you wish to change, then select the "Size" radio item. Next select the number of dialog units that you wish to change at a time in the spin form. Decrease the height of the objects by clicking the up button, increase the height of the objects by clicking the down button, decrease the width by clicking the left button, increase the width by c licking the right button.

See Also

Arrange Objects


Arrange Objects

The Arrange Objects panel is used to manipulate the size or position of multiple objects in the Visual Designer relative to each other.

Resizing Objects

Select one or more objects in the Visual Designer that you wish to change, then select the "Active" checkbox in the Resize group. Next select the number of dialog units that you wish to change in the height (Y) or width (X) dimensions. Click the apply button to change the object(s) sizes accordingly. If you do not enter a value into one of the X or Y dimensions then that dimension is left unchanged.

Moving Objects

Select two or more objects in the Visual Designer that you wish to change, then select the "Active" checkbox in the Distance group. Next select the number of dialog units that you wish to change in the top/bottom (Y) or left/right (X) dimensions. Click the apply button to change the object distances relative to each other. If you do not enter a value into one of the X or Y dimensions then that dimension is left unchanged.

It is recommended that you activate only the Resize or the Distance group at a time instead of attempting to change both Distance and Size together.

See Also

Nudge Objects


Problem Resolution

Use the Problem Resolution panel to review problems the Studio has detected in your code during parsing that affect the Studio's ability to model the code.

For example if you have an object declaration but the Studio cannot locate the object's class declaration then that would prevent the object from being modeled in the Visual Designer and Properties Panel. This would raise an error in the Problem Resolution panel.

It is also true that many errors listed in the Problem Resolution panel would raise compiler errors when you attempt to compile the current project, however the Problem Resolution panel is primarily concerned with coding errors that prevent your code from being correctly modeled.

Whenever you are editing code that causes some modeling problem then the Problem Resolution panel is automatically updated to indicate the problem. As you repair the problem in the editor the panel is automatically cleared.

Problems in the Current Project

Normally the Problem Resolution panel will display errors and warnings for all files belonging to the current project. The treeview control lists each file where problems have been detected indicating the number of problems next to the filename. If the file currently being edited is listed then its tree item is bold and expanded to display the problems.

Double-clicking a tree item will activate the Code Editor and position the cursor at the location where the problem was detected by the Studio.

The Problem Resolution panel will display two types of problem: Errors and Warnings.

Errors

An error is indicated in the tree by the following icon:

- Error.

An error means that there is a reference to something in your code that could not be resolved in the entire project. For example a use statement that references an invalid filename.

Warnings

- Warning.

A warning means that there is a reference to something that cannot be resolved in the current file or any file that is used by the current file, but it can be resolved in one of the other files that belong to the current project.

A warning indicates that the file in question is not "autonomous" outside the context of the current project. Generally it is good practice to ensure that all your code files are autonomous, but it is not mandatory. There may actually be cases where full autonomy is not possible due to circular reference problems or the file may be a bad location for use statements to certain files.

The Problem Resolution panel allows you to filter warnings. To do this select Filter Warnings from the Problem Resolution panel's context menu.

Problems in Files not Belonging to the Current Project

When you are editing a file that does not belong to the current project then the contents of the Problem Resolution panel changes to display only problems belonging to that file.

In this case the file will not be analyzed relative to any project. This means that any problems that would normally be raised as warnings when that file belongs to the current project will be displayed as errors because the Studio will not be able to resolve the reference.

Recursive Errors

Normally, when you are editing a file not belonging to the current project the Problem Resolution panel will not display errors occurring in files that are used by the current file. However you can instruct the Problem Resolution panel to perform such a recursive problem search by selecting Show Recursive Errors from the context menu.

This would allow you to resolve all errors preventing the file from being autonomously modeled in the Studio i.e. modeled outside the context of the current project.

Problem Indicator

The Studio's status bar contains a special Problem Indicator pane. Whenever there are problems listed in the Problem Resolution panel then this pane will display a special icon.

- Problem Indicator.

Clicking on this icon will activate the Problem Resolution panel displaying the list of files with problems.

Context Menu Operations

Locate Problem

Locates the selected problem in the Code Editor.

Filter Warnings

Toggles whether warnings are listed or not.

Show Recursive Errors

Toggles whether errors in used files are listed when the current file does not belong to the current project.

Refresh

It is possible that code you are editing in the current file will cause (or clear) problems in other files belonging to your project. Unfortunately the Problem Resolution panel does not always scan all files in the project for these indirect changes to the list of problems.

The refresh operation will force the Problem Resolution panel to scan all files in the current project so that all such "subtle" changes will be picked up immediately.


Output

The Output panel is used to display important information as the Studio is performing various operations. Whenever new information is added to the Output panel it will be made visible to highlight the new information.

File References

Many times an entry in the Output panel will contain a reference to some source code file. Whenever this is the case it is possible to double-click the reference to open the source file in the Code Editor and position the cursor to the relevant line.

Compiling

The main use of the Output panel is to display output while compiling. As a project is being compiled information about each source file is displayed in addition to any compiler errors.

Reconciling Compile Errors

When compiler errors or warnings are displayed you can double-click the entry to load the file and position the cursor on the error.

Debugging

When running a project the Studio will display status information about the debugger in the Output Window. If there are any problems applying you breakpoints, then these problems will also be displayed in the Output panel.

Context Menu Operations

The Output panel supports the following context menu options:

Copy to Clipboard

Use this option to copy all text form the output panel into the Windows clipboard. This may be useful for recording information about a particular problem.

Clear All

Use this option to clear the contents of the Output Panel.

Locate In Editor

Whenever the current tree item contains a reference to some source code file then this option can be used to open the file in the Code Editor and position the cursor on the relevant line.


Find Results

The Find Results panel is used to display the results of a Find In Files operation.

Each file that was found to contain one or more references to the searched string is listed as root items in the Find Results treeview. Expanding one of the file nodes will reveal each instance where the searched string is located in that file.

Double-click a reference in the treeview to open that file and position the cursor on the relevant line. The searched string will also be selected in the editor.

For more information refer to Find In Files.

Context Menu Operations

The Find Results panel supports the following context menu options:

Locate In Editor

Opens the selected file and positions the cursor on the appropriate line of code.


File Navigator

Use the File Navigator to view an alphabetically sorted list of each file that is open in the current workspace.

The file that you are currently editing will be displayed in a bold font. Any file that has changes pending a save will be indicated using a special icon.

Navigating

You can use the File Navigator to bring to front any file in the list. Double-clicking on a file will activate the last used view to that file. i.e. if the last work you performed on that file was in the Visual Designer, then the Visual Designer is once again activated for that file.

You can specify which view to the file you wish to activate by selecting Code View, or Designer View from the context menu. You can also request the Code View and Designer View to be windowed one next to the other in a cascading MDI child window style.

Closing

File Navigator presents a very efficient way to close multiple files. Simply navigate the list with the arrow keys and press the Del key for each file you would like to close.

Context Menu Operations

The File Navigator supports the following context menu options:

Code View

Activates the Code View for the selected file.

Designer View

Activates the Designer View for the selected file.

Cascade

Activates the Code View and Designer View for the selected file and windows them using the cascading MDI child window style.

Save

Saves the selected file.

Close

Closes the selected file.


Project Menu

Add Components to Project

Select this option to select one or more component files to add to the current project. This activates the Open File dialog where you can select the desired component files. The type of component that you add must match the type of the current project.

For more information see: Current Project, Adding Components to Projects, Component Files.

Remove Components from Project

Select this option to remove one or more components from the current project. This activates the Remove Components dialog.

Compile Project

Select this option to compile the current project. If none of the project files have changed since the last compile then this operation will stop. Compiler output (including errors) will be displayed in the Output Panel.

For more information see Rebuild Project.

Precompile

Select this option to activate a submenu displaying precompile options.

Precompile Project

Select this option to precompile the current project. If you are using a #Header \ #EndHeader block in your project file, then this block will be precompiled. Otherwise if the first statement in your project file is a Use statement then this file will be precompiled.

Compiler output (including errors) will be displayed in the Output window.

Precompile File

Select this option to precompile the current file. Compiler output (including errors) will be displayed in the Output Panel.

Precompile System Packages

Select this option to precompile the system package files: Windows.pkg, DFAllEnt.pkg and AllWebAppClasses.pkg. You would rarely need to perform this operation as these files are installed already precompiled.

Compiler output (including errors) will be displayed in the Output window.

See Also

Precompiling

Rebuild Project

Select this option to compile the current project. This operation forces a compile of the project regardless of whether the project files have changed since the last compile. Compiler output (including errors) will be displayed in the Output Panel.

For more information see Compile Project.

Add Project

Select this operation to add a project file to the list of registered projects in the current workspace. This activates the Open File dialog where you can select one or more project source files.

Remove Project

Select this option to remove the current project from the list of registered projects in the current workspace. This operation does not delete the project source file.

Project Properties

Select this option to edit project properties for the current project. This activates the Project Properties dialog.

See Also

Workspace Explorer

Menus


Precompile System Packages

Use the Precompile System Packages option to pre-compile the Visual DataFlex class libraries. Pre-compilation is useful for reducing the compile time of your applications.

Visual DataFlex Precompiles

Visual DataFlex provides three packages that are precompiled:

  • Windows.pkg

  • DfAllEnt.pkg

  • AllWebAppClasses.pkg

These reside in the PKG folder of your Visual DataFlex installation.

Windows

The Windows.pkg package is provided as part of the Visual DataFlex installation. This package is used by the DFAllEnt package, and you should have no reason to change it. You should only need to precompile this package if:

  • The precompiled files have been deleted

  • You suspect that the precompiled files have become corrupt

The Windows package, Windows.pkg, is located in the Pkg folder of the Visual DataFlex installation.

DFAllEnt

The DFAllEnt package is used to pre-compile most of the classes used to build a windows application. It is a standard part of the Visual DataFlex installation.

This package is usually used directly in each of your windows applications as the precompiled package; you should have no reason to change it. You should only need to pre-compile this package if:

  • You precompile Windows.pkg

  • The precompiled files have been deleted

  • You suspect that the precompiled files have become corrupt

The DfAllEnt.pkg, is located in the Pkg folder of the Visual DataFlex installation.

AllWebAppClasses

The AllWebAppClasses package is used to pre-compile the classes used to build a web application. It is a standard part of the Visual DataFlex installation.

This package is usually used directly in each of your web applications as the precompiled package; you should have no reason to change it. You should only need to pre-compile this package if:

  • You precompile Windows.pkg

  • The precompiled files have been deleted

  • You suspect that the precompiled files have become corrupt

The AllWebAppClasses.pkg, is located in the PKG folder of the Visual DataFlex installation.

See Also

Subclassing


Remove Components

The Remove Components dialog is used to remove multiple components from the current project. Component files are not deleted but the use statement for that component will be removed from the current project.src file.

Components that are used indirectly, such as database dialogs or data dictionaries cannot be removed in this way. Instead, you must edit the source code to remove the use statements from the appropriate component files.

The treeview control displays the list of component files for the current project that may be removed. The component files are grouped by component category. Expand each category tree item to review the list of component files in that category.

For more information see: Workspace Explorer.

To select a component file for removal, click in the checkbox next to the filename. When you are ready to remove the selected files click the OK button.


Project Properties

Use the Project Properties dialog to edit properties that relate to the current project. For example, the application's version information can be edited here.

The application properties are divided into five tab pages:

  • General

  • Web Application

  • Version

  • Icons

  • Bitmaps

Scan for Images

Click this button to analyze all source files that will be compiled in your application for references to bitmap names. Any bitmap names that are found will be added to the list of bitmaps on the application properties bitmaps page.

Once this operation is completed, it cannot be undone. i.e. the changes to the application configuration file are saved at the end of this operation.

OK

Click OK to save changes to the project properties and close the dialog.

Cancel

Click Cancel to close the dialog and discard changes to the project properties.


Project Properties - General

File Name

This is the filename of the file that stores the current project's source code. This edit box is read-only.

Workspace Name

Displays the name of the current project's workspace.

Application Icon

This is the filename of the Icon that the Linker will embed into your application. This is the icon that will represent the application in Windows Explorer. It is also the icon that will be displayed when the user Alt-Tabs through the running applications on their machine.

This information is stored in the project's .cfg file under the [Application] section.

The Project Properties dialog will attempt to display the icon in the view panel to the right of this edit box.

Load Icon

Click this button to launch the Icon Extractor dialog for browsing directories for your desired icon or for extracting icons from .exe and .dll files.

For more information refer to Icon Extractor.

Parameters

The Run operation supports command-line parameter passing to the application which is launched.

Example: If you set the parameters setting for the Order Entry Application to "-L John" then, when the application is run from the Studio, it will add the string "-L John" to the command line. i.e. "Order.exe -L John".

Build Manifest File

Check this box to generate a manifest file for your application whenever your project is compiled. Manifest files are needed to achieve Windows XP "styles" when running your application on Windows XP or greater.

The manifest file is placed in the workspace's programs directory and is named <project>.exe.manifext. e.g. the manifest file for the order entry application would be Order.exe.manifest.

Auto Generate Menus when Adding Components

The Workspace Explorer supports an Add Component operation.

Check this box if you are editing a Windows MDI application project and you wish the Studio to maintain special View and Report menus whenever you add a View or Report component.

The code will only be generated if your project.src file contains the correct structure of objects for an MDI Windows application including a DFCreate_Menu structure for the main menu. The Windows Project template in the Create New dialog will create an MDI Windows application project with the necessary structure of objects.

This feature is provided for backward compatibility with prior Studio versions that maintained DFCreate_Menu structures for View and Report components.

See Also

Project Properties Overview

Web Application

Version

Icons

Bitmaps


Icon Extractor

The Icon Extractor is a useful tool for selecting icon filenames in the Project Properties dialog. It can also be used for examining embedded icons in .exe, .dll, or .res files. You can select any icon from any of these files and save it in a separate .ico file for use in your Visual DataFlex project.

Toolbar Buttons

Open Network Folder

The Icon Extractor defaults to display files in the Workspace's Bitmaps folder. If this is on a local drive and you wish to inspect an icon on a network drive, then Click this button.

Up Folder

Click this button to go up one level in the folders list.

Jump to Visual DataFlex Bitmaps Folder

Click this button to display files located in the global Visual DataFlex bitmaps folder.

Jump to Workspace Bitmaps Folder

Click this button to display files located in the current workspace's bitmaps folder.

Extract and Save Selected Icon

Click this button to save the icon that is currently displayed in the Icon View panel as a .ico file. You can use this button for extracting icons from .exe, .dll, or .res files. You can also use it to make a copy of a .ico file under a different name or in a different location.

The default directory for saving the .ico file is in the current workspace's Bitmaps folder (this is the recommended location for all your project's bitmaps and icons).

The default filename for saving the .ico file is the same as the selected filename with the .ico extension.

Display Controls

Drive Selector

Use this combo box to select the disk drive where you wish to start exploring icons. The Folder Selector will be updated to display a list of folders contained in the selected drive.

Only local disk drives, or mapped network drives are listed.

Folder Selector

This displays the current folder of the selected drive in a hierarchical list. Click on a folder to open it and display a list of folders contained inside. The File Selector (see below) will be updated to display all appropriate files contained in the selected folder.

File Selector

The File Selector displays a list of all appropriate files contained in the currently selected folder in the Folder Selector.

By default, only .ico, .exe, .dll and .res files are displayed. You can change this by selecting a different filter in the Filename Filter box (see below).

When you select a file in the File Selector, the Icon Extractor will display the file's embedded icon in the Icon View Panel (if the file has an icon). If the file has more than one embedded icon, then the Icon View Panel displays the first one. See Icon View Panel

Filename Filter

This combo form is used to filter which files are displayed in the File Selector.

Icon View Panel

This panel displays the icons embedded in the file currently selected in the File Selector list. If the file has no icons, then the panel is blank. If the file has more than one icon, then the first icon is displayed initially. You can browse through multiple embedded icons by clicking the Show Next Icon and Show Previous Icon buttons.

Buttons

Show Next Icon

Click this button to display the next icon in a file that has more than one embedded icon.

Show Previous Icon

Click this button to display the previous icon in a file that has more than one embedded icon.

OK

Click this button to return the filename and path of the currently selected .ico file.

Cancel

Click this button to close the dialog without selecting any .ico file.

See Also

Project Properties Overview

General

Web Application

Version

Icons

Bitmaps


Project Properties Web Application

Application Properties - Web Application

The Web Application properties page provides configuration options specifically relating to web applications.

Web Application Name

This is the name of the web application in the Web Application Administrator. The value displayed is read-only and is read from the current workspace's global.asa file.

Virtual Directory

This value is a copy of the virtual directory name that was created when the web application itself was created. The Studio keeps a copy of this value so that it can be passed as a parameter to tools launched from the Studio's Tools menu.

It is the user's responsibility to maintain this value so that it is synchronized with the web application's actual virtual directory name.

For more information refer to Configuring the Tools Menu.

Session Timeout

This value refers to the IIS session timeout value that applies to the web application. This value is written to the web application's global.asa file each time the web application is compiled.

Test URL

This provides the URL in the workspace's AppHtml folder for the HTML file used by the Studio to test run the web application.

Generate Test Html

If this option is checked, then the Studio will generate a simple HTML file designed to test each web browser object and web service object in the web application project.

The HTML file which is generated contains a menu of links to other web pages. For WBOs the name of each web page linked to is the same as the file name of each WBO component in the web application. For example: if the project contains a WBO named Customer.wo, then the test HTML will contain a link to Customer.asp.

The name of the HTML file that is generated is determined by the Test URL property 'above'.

If you do not want the Studio to generate this file each time the web application project is compiled, then uncheck this option.

See Also

Project Properties Overview

General

Version

Icons

Bitmaps


Project Properties Version

Application Properties - Version

The Version properties page allows you to add revision numbers and descriptive text (such as company name and copyright information) into your compiled applications.

When you compile your project, the linker embeds the version information as an embedded resource into the compiled executable.

Include version information in build

Check this option to enable version information to be entered. This information is then included in the compiled code.

Application version

Major, Minor, Release, and Build each specify a component of the application version number. The combined string defines a version number for the application, for example 11.0.63.0.

Auto-increment application build information

Check this option to have the application build number incremented automatically each time the project is compiled.

Special build

Check this option to indicate that the version is a variation of the standard release.

Private build

Check this option to indicate that the version was not built using standard release procedures.

Comments

Use this box to enter additional application information for diagnostic purposes.

Company Name

Use this box to enter the name of the company that produced the application.

File Description

Use this box to enter a general description of the application file.

Internal Name

Use this box to enter the any internal name the application is known as during its development.

Legal Copyright

Use this box to enter copyright notices.

Legal Trademarks

Use this box to enter trademarks and registered trademarks that apply to the application.

Original Filename

Use this box to enter the original filename, not including path.

Product Name

Use this box to enter the name of the product that the application is distributed with. This is the product relating to the product version information entered above.

Special Build

Use this box to enter notes pertaining to the special build of this application. You would enter these notes when the special build check box is checked.

Accessing Version Information Programmatically

Once Version Information is compiled into an application, users can examine the information by displaying your application's Properties dialog in Windows Explorer. Programmatically, you can retrieve the Version Information at runtime using the cVersionInfo class.

The AboutDialog class can automatically display the Version number from the running application's Version Information, if it is available. To use this feature, do not set the AboutDialog’s Version property, as any value you set (even null) will take precedence.

See Also

Project Properties Overview

General

Web Application

Icons

Bitmaps


Project Properties Icons

Application Properties - Icons

The Icons page is used to maintain a list of further icons that will be linked into the compiled application. The information that is maintained here is stored in the project's .cfg file in the [Icons] section.

Icon List

The Icon List at the top of this page displays a scrolling list of all icons to be linked with this application. The list cannot be edited directly but when you select a row the name and path are displayed in the corresponding edit boxes and the icon is displayed in the icon view panel.

Name

This is a unique identifier for each icon in the icon list. This can be any valid identifier and does not need to be the same as the icon's filename.

Path

This is filename of the selected icon. If the icon file is located in one of the compiler's make paths, then you can omit the pathname for that file. The path will be resolved during linking. If the file is not located in one of the make paths then you need to include the path as part of the filename.

Click the prompt "…" button to launch the Icon Extractor dialog for browsing directories for your desired icon or for extracting icons from .exe and .dll files.

For more information refer to Icon Extractor.

Add Icon

Adds a blank row to the icon list and selects it for editing.

Delete Icon

Deletes the selected row from the icon list.

See Also

Project Properties Overview

General

Web Application

Version

Bitmaps


Project Properties Bitmaps

Application Properties - Bitmaps

The Bitmaps page is used to maintain a list of bitmaps that will be linked into the compiled application. The information that is maintained here is stored in the project's .cfg file in the [Bitmaps] section.

Bitmap List

The Bitmap List at the top of this page displays a scrolling list of all bitmaps to be linked with this application. The list cannot be edited directly but when you select a row the name and path are displayed in the corresponding edit boxes.

Name

This is a unique identifier for each bitmap in the bitmap list. This can be any valid identifier and does not need to be the same as the bitmap's filename.

Path

This is filename of the selected bitmap. If the bitmap file is located in one of the compiler's make paths, then you can omit the pathname for that file. The path will be resolved during linking. If the file is not located in one of the make paths then you need to include the path as part of the filename.

Click the prompt "…" button to launch an Open File dialog for browsing directories for your desired bitmap.

Preview

Clicking this button pops up a modal dialog that displays the selected bitmap. If the bitmap file is invalid or cannot be opened an appropriate error message is displayed.

Add Row

Adds a blank row to the bitmap list and selects it for editing.

Delete Row

Deletes the selected row from the bitmap list.

See Also

Project Properties Overview

General

Web Application

Version

Icons


Debug Menu

The debug Menu lets you control execution of your project after a breakpoint has been encountered and the debugger has control of your program. Various stepping options may be selected.

Windows

The Windows sub-menu lets you activate the various docking windows associated with debugging.

Run <project>

Select this option to run a project. The project is automatically compiled first if necessary.

Keyboard shortcut F5.

Pause

Pause lets you manually pause the program and enter break mode without a specific breakpoint. Execution will break immediately, and the program enters break mode. After which you can step through the program and the various debug windows are updated.

Continue

Continue leaves break mode and resumes execution until a breakpoint is encountered, or the program is manually paused.

Keyboard shortcut F5.

Step Over

Step Over executes the current line and stops on the following line, stepping over method calls.

Keyboard shortcut F10.

Step Into

Step Into executes the current line and stops on the next line encountered, stepping into any method call.

Keyboard shortcut F11.

Step Out

Step Out resumes execution until the current method returns to the calling method. Execution will break at the return point of the calling method. Stepping out of the current method call.

Keyboard shortcut F12.

Run to cursor

Run to cursor resumes execution until the line where the cursor is located is reached.

Keyboard shortcut F6.

Go to instruction address

Find the corresponding source file and line for a specified instruction address.

Keyboard shortcut Alt+G.

Stop

Ends the current debug session and stops the program. When the debugging is stopped, the Studio will automatically leave debug mode. This should not be confused with Pause.

Keyboard shotcut Shift+F5.

See Also

Debugging

Menus


Breakpoints Panel

Breakpoints Window

The Breakpoints Window lists all the breakpoints that are currently defined in the workspace. They are displayed using the name of the source file and the line number (relative to the source file) of the breakpoint.

Breakpoints are set by clicking in the left margin of the Code Editor for the specified line of source. A red icon is displayed for enabled breakpoints and a clear icon is displayed for disabled breakpoints. You can also use the context menu in the editor or press F9 to set breakpoints.

The Breakpoints window supports various operations through its context menu:

Enabled

Depending on the current state of the selected breakpoint, toggle the breakpoint between enabled and disabled state.

Disable All

Set the state for all breakpoints to disabled.

Enable All

Set the state for all breakpoints to enabled.

Remove Breakpoint

Remove the selected breakpoint.

Remove All

Remove all breakpoints in the current workspace.

Locate in Editor

Find the breakpoint in the appropriate source file and display it in the Code Editor.

See Also

Breakpoints

Debugging

Docking Panels


Locals

The Local Variables window lists the variable name and value for each variable in the selected method context. You can also modify the values of the local variables. The method context is defined by the selected call stack entry in the Call Stack Window. Activating a different call stack entry in the Call Stack window also updates the Local Variables window with the variables of the selected method context. As you step through a program the values are also updated as the selected method context automatically changes.

Name

Displays the name of the local variable.

Value

Displays the current value of the local variable. To edit, select the variable and click in the corresponding Value column.

See Also

Viewing and Modifying Variables

Globals

Debugging

Docking Windows


Message Trace

Message Tracing

Message tracing lets you create a history of messages. Since messages are really procedure and function calls, a message trace can be thought of as a call stack history. Messages are displayed in a tree view hierarchy.

The Message Trace window supports various operations through it's context menu, accessed by right-clicking in the Message Trace window.

Trace Messages

This option starts and stops the message trace. A checkmark indicates that a trace is in operation. After you have started the trace you should return to your program and execute the event or events you wish to trace. Do not leave the message trace running once you no longer need it. It will slow down your debugging process and consume resources.

Clear Trace

Clears the Message Trace tree view.

Filter

This option lets you quickly add a message to the filter, and suppress future occurrences of a specified message. Select the message you wish to filter, right-click and select the Filter menu option. This adds the specified message to the list of filtered messages.

Filter Options...

Brings up the Message Trace Options dialog, which lets you add/remove messages to be filtered.

Save Trace

This saves the complete message history. All nodes are fully expanded. This provides a complete record of your history trace.

When a trace file is saved it is written to a file named file with the same name as your program with an added ".trc". extension. A message box will appear noting the full name of the saved trace file.

Save Trace as is

This saves the message history at the current expansion level. If a message trace is not expanded in the trace window it will not appear expanded in the saved file.

When a trace file is saved it is written to a file named file with the same name as your program with an added ".trc". extension. A message box will appear noting the full name of the saved trace file.

See Also

Using the Message Trace Window

Debugging

Docking Windows


Message Trace Options

When using the Message Trace, sometimes a message trace can be overwhelming with too much information, so you might want to filter out certain messages. This dialogs allows you to specify which messages to filter out.

To add a filter, click the Add Filter button and type in the message name. Or alternatively you can select a specific message in the Message Trace window, right-click and select filter.

Message Name

The name of the message that should be filtered. This should be the decorated message name, i.e. with the msg_, get_, or set_ prefix.

Load Default Filters

Removes all existing filters and loads the default filters.

A few specific messages are filtered by default, which typically occur very often and are usually of little interest. Click this button to load the default set of filters.

Clear All

Removes all filters.

Add Filter

Adds a new filter to the end of the list, so that you can edit the message name.

Delete filter

Deletes the currently selected filter from the list.

OK

Click OK to save the changes to the message trace options and close the dialog.

Cancel

Click Cancel to close the dialog and discard changes to the message trace options.

See Also

Using the Message Trace Window

Debugging


Globals

The Global Variables window lists the variable name and value of all global variables in the program. You can also modify the values of the global variables.

Name

Displays the name of the global variable.

Value

Displays the current value of the global variable. To edit, select the variable and click in the corresponding Value column.

See Also

Viewing and Modifying Variables

Locals

Debugging

Docking Windows


Watches

The Watches window lets you view anything from simple variables to complex expressions. The Watches window is often used as a complement to the Local/Global Variables windows. You can add variables/expressions that you wish to track over the course of the debugging session, or that you wish to find quickly without having to sort through a bigger list in the Local/Global Variables windows.

Name

Displays the expression or variable name. To edit, select the expression and click in the corresponding Name column.

Value

Displays the value of the expression. If the expression is a variable, the value can be edited by selecting the expression and clicking in the corresponding Value column.

Adding Expressions to Watches

You can add a variable/expression to the watches window by clicking in the Name column of the last empty row, which will open it up for editing, and then type in the name of the variable or the expression and press Enter.

You can also use drag and drop to add watches. Select the desired text from the Code Editor, and drag the text using the mouse to the Watches window and drop it. The selected text will be added to the end of the list of watches.

Watches can also be added from the Local / Global Variables window as well as the Database Tables window. Select the specified variable/table column, right-click and select Add to Watches.

See Evaluating Expressions and Using the Watches Window for more information.

Context Menu

The Watches window supports various operations through it's context menu, accessed by right-clicking in the Watches window:

Remove All

Removes all watches.

See Also

Debugging

Docking Panels


Tables

The Database Tables window lists all of the database tables that are open in the project you are debugging. This panel uses a treeview to list all of the tables and the columns. The two columns are Name and Value.

Name

The Name column shows the table name and table number, as well as all column names for the specified table.

Value

The Value column shows if the buffer for the table is Active or Inactive, as well as the current value for respective columns of the specified table.

See Also

Using the Database Tables Window

Debugging

Docking Panels


Call Stack

The Call Stack window displays the nested method calls currently on the stack. Whenever a method is called an entry is added to the call stack. When this method calls another method another entry is added to stack. When a method is completed, its entry is removed from the call stack. The current method is always displayed at the top of the call stack, and the method from where it was called is displayed directly below.

For more information see Using the Call Stack Window.

Message

Displays the decorated name of the method.

Object

Displays the name and object id of the object in context for the specified method. The Object column is empty if it's a global procedure/function.

Switching Call Stack Frame and Method Context

To switch to another call stack frame, click the specified entry in the Call Stack window. Clicking a Call Stack entry takes you to the source code for the current line in that call stack frame, and the Local Variables window is updated with the local variables for that method context.

See Also

Debugging

Docking Windows


Go to Instruction

Go to Instruction Address

This dialog allows you to find the corresponding source file and line for a specific instruction address. This dialog is only available when the Studio is in debug mode. To find the source for a specific program instruction address which you may have seen mentioned in an error message, type in the instruction address and press OK.

Instruction Address

The program instruction address you want to locate.

See Also

Debugging


Select Current Project

Use the Select Current Project dialog to select one of the current workspace's projects and make it the current project.

Project List

This list shows each registered project for the current workspace. To change the current project, select a project from the list and click OK, or double click the project.

OK

Click the 'OK' button to make the selected project from the list the current project.

Cancel

Click the 'Cancel' button to close the dialog without changing the current project.

See Also

Workspace Explorer


Tools Menu

Database Builder

Select this option to modify your workspace's database design and data dictionary classes. This launches the Database Builder tool.

Database Explorer

Select this option to view and edit data in your workspace's database. This launches the Database Explorer tool.

Error Code Maintenance

Select this option to modify Visual DataFlex error codes and their descriptions. This launches the Error Code Maintenance tool.

Web Application Administrator

Select this option to monitor and administer your web applications. This launches the Web Application Administrator tool.

Configure Studio

Select this option to modify the Studio configuration options. This activates the Configure Studio dialog.

Configure Editor

Select this option to modify the Code Editor configuration. This activates the Configure Editor dialog. There must be at least one file open in a Code View before you can perform this configuration.

Configure Workspace

Select this option to modify the current workspace's configuration. This activates the Configure Workspace dialog.

Configure Create New

Select this option to configure the palette of options in the Create New dialog. This activates the Configure Create New dialog.

Configure Database Drivers

Select this option to configure the set of database drivers that are loaded into memory. This activates the Configure Database Drivers dialog.

Restore Layout

Select this option to restore the window layout of all docking windows e.g. Code Explorer, File Navigator, Workspace Explorer windows etc to their default positions.

The Studio supports two different layouts depending on what action the Studio is currently performing.

  • Design Time Layout: This is the layout of windows while you are editing files, visually designing, etc.

  • Debugging Layout: This is the layout of windows while you are debugging a project.

To restore the design time layout of windows to defaults, select this option while the Studio is in design time mode (i.e. not debugging).

To restore the debugging layout of windows to defaults, select this option while the Studio is debugging.

See Also

Menus


Configure Studio

Use the Configure Studio dialog to customize various visual and operational aspects of the Visual DataFlex Studio.

The dialog is divided into four tab pages:

  • General

  • Code Explorer

  • Print Options

  • File Extensions

OK

Click OK to save changes to the Studio configuration and close the dialog.

Cancel

Click Cancel to close the dialog and discard changes to the Studio configuration.

See Also

Configure Editor


Configure Studio - General

Load Previous Workspace when Starting the Studio

Check this box for the Studio to load the last opened workspace when the Studio application is started.

If you want to take advantage of launching multiple instances of the Studio then you may prefer to uncheck this option since the Studio cannot load any workspace that is already opened in some other instance.

Save/Restore Workspace Desktop

Check this option to restore all open files when opening a workspace. i.e. when a workspace is closed the Studio will remember each file that was open, the z-order of Code Views and Designer Views, the current cursor position in each Code View and the set of breakpoints in each Code View. These attributes will all be restored the next time the workspace is opened.

Show Designer Resolution Grid

Check this option to display a background grid in each Visual Designer windows. This grid is intended to give visual queues for various screen resolutions.

See Also

Configure Studio


Configure Studio - Code Explorer

Use this page to configure filtering options for the Code Explorer. Each possible type of code entity that Code Explorer can display is listed. To allow displaying a particular type of code entity check the appropriate box. To filter an entity uncheck the appropriate box.

Below is an explanation of each filter option:

Display Classes

Check this box to show class declarations.

Display Methods

Check this box to show procedure, procedure set and function declarations.

Display Properties

Check this box to show property declarations.

Display Objects

Check this box to show object declarations.

Display Uses

Check this box to show use statements.

Display Constant Declarations

Check this box to show constant definitions represented by define statements or the #REPLACE directive.

Display Struct Declarations

Check this box to show struct declarations.

Display Legacy Menus

Check this box to show menus that are declared using the DFCreate_Menu command.

Display Import Class Protocols

Check this box to show Import_Class_Protocol statements.

Display ActiveX Resources

Check this box to show ActiveX control resource data defined within Embed_ActiveX_Resource blocks.

Display Entry_Item Lists

Check this box to show data binding code structures defined within Begin_Row blocks.

Display Entry_Item Statements

Check this box to show data bindings defined using the Entry_Item statement.

Display External Functions

Check this box to show External_Function declaration statements.

See Also

Configure Studio


Configure Studio - Print Options

Use this page to configure page formatting options when printing source code.

Print Rich Fonts

Check this box to print source code using all the font attributes (such as bold, italic or underline) that are used for displaying code in the editor.

Print Color

Check this box to print the same color highlighting used when displaying code in the editor. If you have a black & white printer then gray shades will be printed instead.

Print Page Numbers

Check this box to print a page number on each page of output.

Print Date and Time

Check this box to print a date and time stamp on each page of output.

Print Line Numbers

Check this box to print sequential line numbers next to each line of output.

Page Borders

Specifies that a border will be printed around each page of output. Four page border options are available:

  • None: no border.

  • Thin: prints a thin single line.

  • Thick: prints a thick single line.

  • Double: prints a thin double line.

Special Note

This page is also accessed directly from the File Menu.

See Also

Configure Studio


Configure Studio - File Extensions

Use this page to register additional Visual DataFlex source code file extensions. The Studio uses the file extension of each file it opens to determine the "type" of file being opened.

If you use a file extension for Visual DataFlex source code that is not one of the default Visual DataFlex file extensions then it will need to be registered here so that it will be recognized by the Studio and modeled as Visual DataFlex source code. Enter each additional file extension in the list control. Example: to specify that all files opened with the .rpt extension should be interpreted as Visual DataFlex source code files then enter the string '*.rpt' (without the quotes).

Refer to Studio File Types for a list of all file extensions recognized by default by the Visual DataFlex Studio.

See Also

Configure Studio


Configure Workspace Properties

Use the Configure Workspace dialog to customize the setup and behavior of the Studio while operating in the current workspace.

The dialog is divided into three tab pages:

  • Class Preferences

  • Workspace Paths

  • Conditionals

OK

Click OK to save changes to the workspace configuration and close the dialog.

Cancel

Click Cancel to close the dialog and discard changes to the workspace configuration.

See Also

New Workspace Wizard


Configure Workspace - Class Preferences

Use this tab page to configure the default class to use when:

  • Creating objects in the Designer via using DDO Explorer

  • Creating a new component using a wizard

  • Creating a Data Dictionary subclass in Database Builder

The class preferences simply determine what classes are used when objects are created from the DDO explorer or a new component wizard. When you create new sub-classes using either the New Class option or the Multi-class wizard option, you may wish to make these classes your preferred class for these operations.

Note that classes created via these two options never automatically update these preferences – it must be done here in this dialog.

Also note that once new objects are created via a new component wizard or a DDO explorer selection that you can easily change the source code and assign the object to a different class.

A list of classes that can be configured are displayed in a three column grid. For each default class listed in this grid (e.g., dbForm), a class preference must be identified by assigning a class name and a file name where that class is defined (e.g. cMyWSdbForm, cMyWSdbForm.pkg). By default, the class preferences listed are the standard system classes (e.g., dbForm, DFEntry.pkg). If you have created another class that you would sooner use, you may define that preference. These preference classes should almost always be a subclass of the default system class.

Default Class Name

This column lists each system class where the Studio supports subclasses in DDO Explorer operations, Create New Wizards or as a data dictionary subclass.

Workspace Class Name

Use this column to specify the name of a subclass that the Studio will use when creating an object of the corresponding default class from DDO Explorer, one of the wizards in Create New, or for data dictionary classes in Database Builder.

The combo list contains the list of all classes listed in the current workspace's Class Palette.

Most preference classes should already be defined in your class palette and therefore should be in this list. If you select the class from this list, the correct workspace class file will be automatically selected.

If you are selecting a class that is not in the class palette, you might first want to check that you really want to do this. If you really want to use this class as a preference, it should probably be in the class palette. The exception to this rule will be the Data Dictionary class, which should not be defined in your class palette.

If the class is not in your class palette (most likely a Data Dictionary class), you will want to first select the workspace class file. This will add the class to this list, allowing you to make your selection.

Workspace Class File

Enter the filename of the package where the workspace class is declared. To browse for the desired file click the prompt button to activate the Select File dialog. You should rarely need to make this selection because selecting the workspace class name will select the class file for you. The exception to this will be, as noted above, the Data Dictionary class.

See Also

Configure Workspace Properties

DDO Explorer

Create New

Database Builder


Configure Workspace - Conditionals

The Studio's parser does not support intelligent analysis of conditionally compiled code. By default the parser will analyze all code inside a #IFDEF - #ELSE - #ENDIF structure.

In most cases this would not be a problem as the conditional code would not affect how the Studio would model your project. However there are times when you would have code inside conditionally compiled blocks that could affect the Studio's description of your project. For example:

Define C_VERSION_10

Class cMyButton is a Button

Procedure Construct_Object

Forward Send Construct_Object

#IFDEF C_VERSION_10

#ELSE

Property Boolean pbAutoSave True

#ENDIF

End_Procedure

End_Class

In this case the compiler would not compile the property declaration inside cMyButton but the Studio parser would process this declaration and add pbAutoSave to its metadata for the cMyButton class.

To prevent this from occurring you can declare such symbols in this tab page and describe whether the parser should consider the symbol to be defined or not defined.

Library defined #IFDEF conditionals

If your current workspace is using libraries then any conditional compile symbols that are defined in those library workspaces will be inherited by the current workspace. The inherited symbols will be listed in this grid.

Symbol

This column displays the name of the inherited symbol.

Condition

This column displays whether the symbol is to be considered defined (True) or not defined (False) by the parser.

Library

This column displays in which library workspace the displayed symbol is defined.

Workspace defined #IFDEF conditionals

Use this table to declare symbols that control conditionally compiled code in the current workspace (and any workspace that imports the current workspace as a library).

Note: You should only declare the symbols that would affect the Studio's ability to model your projects. If a symbol would have no affect on the Studio's modeling then you do not need to declare it here.

Symbol

Enter the name of the symbol that you are declaring.

Condition

Enter whether the symbol is to be considered defined (True) or not defined (False) by the parser.

Add Symbol

Click this button to add a new row to the bottom of the grid.

Remove Symbol

Click this button to delete the currently selected row.

Predefined Conditionals

The Studio's parser assumes that the following special symbol is predefined:

IS$WINDOWS

This means that you do not need to specify this symbol in this dialog for any workspace.

See Also

Studio Parser

#IFDEF Command

Library Maintenance


Configure Workspace - Workspace Paths

Use this tab page to edit the current workspace's pathing and other information.

Relative Path vs. Absolute Path

Workspace paths can be defined using an absolute path, e.g.:

c:\VDF Projects\Accounting\Creditors System\AppSrc

or a relative path, e.g.:

.\AppSrc

Relative paths are always calculated relative to the workspace's "Home" directory. It is best to describe all paths in your workspace relative to the workspace's "Home" directory. This will make it easier for you to relocate workspaces or copy a workspace to a different computer.

Data Entry

Description

Here you may edit the workspace's description.

Home

Enter the path to the workspace's home directory. You may enter an absolute path or a path relative to the location of the workspace paths configuration file (.ws file). You may only enter one directory in this path.

AppSrc Path

Enter the path to the workspace's AppSrc directory. You may enter an absolute path or a path relative to the workspace's Home directory. Multiple directories can be specified and are separated by a semicolon ";".

Note: Support for locating source files in a subdirectory of an AppSrc directory is automatic. i.e. you do not need to specify these subdirectories in the AppSrc path.

DDSrc Path

Enter the path to the workspace's DDSrc directory. You may enter an absolute path or a path relative to the workspace's Home directory. Multiple directories can be specified and are separated by a semicolon ";".

AppHtml Path

Enter the path to the workspace's AppHtml directory. You may enter an absolute path or a path relative to the workspace's Home directory.

Bitmaps Path

Enter the path to the workspace's Bitmaps directory. You may enter an absolute path or a path relative to the workspace's Home directory. Multiple directories can be specified and are separated by a semicolon ";".

Help Path

Enter the path to the workspace's Help directory. You may enter an absolute path or a path relative to the workspace's Home directory.

FileList

Enter the filename and path to the workspace's FileList. You may enter an absolute path or a path relative to the workspace's Home directory.

Data Path

Enter the path to the workspace's Data directory. You may enter an absolute path or a path relative to the workspace's Home directory.

IdeSrc Path

Enter the path to the workspace's IdeSrc directory. You may enter an absolute path or a path relative to the workspace's Home directory.

Program Path

Enter the path to the workspace's Program directory. You may enter an absolute path or a path relative to the workspace's Home directory.

Library Paths

This textbox displays the AppSrc makepath inherited from all of the Library workspaces used by the current workspace.

See Also

Configure Workspace Properties

Workspaces and Libraries

Library Maintenance

New Workspace Wizard


Configure Create New

Configure "Create New" Dialog

Use the Configure Create New dialog to maintain user defined items in the Studio's Create New dialog for the current workspace.

The dialog is divided into two panels. The left panel contains a treeview and the right panel displays information relating to the currently selected item in the tree.

Click the Add button to add a new template or wizard to the currently selected category. To delete a Template, click the Delete button (note that the physical Template is not deleted, just its registration within the Studio).

Templates

New components are created by selecting an option that starts a wizard or by selecting an option that creates a file based on a template file. Template files are stored in a “config” directory and, by convention, have a “.tpl” file extension. The config directories are defined in the workspace (the workspace’s Appsrc\config directory), in each library (each library’s Appsrc\config directory) and in the system library (…\pkg\config).

If you wish to add a new component to your Create New dialog you will probably want to create a new template file for that component. To do this simply create or copy the appropriate template file into your workspace’s Appsrc\config directory and save it using the suggested “.tpl” file extension. If you wish to change a template, find the file, load it and change it.

You should never change or add templates that reside outside of your workspace. This includes templates that reside in a library or system area. This is discussed below.

System & Library Templates

Only wizards and templates that have been added to the list for the current workspace can be edited or removed. System and Library wizards and templates are read only.

System wizards and templates are the wizards and templates installed with Visual DataFlex. Library wizards and templates are the wizards and templates that belong to one or more libraries that are used by the current workspace.

If you wish to make changes to a library, you can do so making that library the current workspace and invoking this dialog from that library’s workspace. Changes can be made to a library’s template file by loading the appropriate template file (located in the library’s Appsrc/config directory) and editing it. Changes made in the library’s configuration list or template content will be applied to all workspaces that use that library.

You should not change the contents of the system template files. If you need to change these templates you can copy these files from the system config directory (…\pkg\config) into the a workspace or library config directory where it can be edited.

When templates are selected the Studio looks for the template file first in the following order:

  • The workspace config directory

  • Any library config directories

  • The system config directory

For more information see: Add\Remove Libraries.

File Category Treeview

The tree on the left of the dialog shows all the wizards and templates that have been registered, categorized by file category.

Project

Project wizards & templates.

View/Report

View and report wizards and templates.

Dialog/Lookup

Dialog and Lookup list (or selection list) wizards and templates.

Web Object

Web service object (WSO) or web browser object wizards and templates.

Web Markup

ASP, HTML, XML, or WML wizards and templates.

Class

Class declaration wizards & templates.

Other

Templates and wizards for creating other types of files.

For more information see Component Files.

Data Entry

To edit an entry first select it in the file category treeview. Note: system templates and wizards are read only. Library templates or wizards can only be edited from the imported library's workspace.

Component Type

Select what type of component you are adding to the selected file category. Each file category will allow a different subset of component types. Select the one that best fits the template or wizard that you are adding or editing.

In some cases the component type will determine whether or not the template or wizard can be used to create a new file. This filtering is determined by the workspace's current project. For example if the current project is a Windows Project then you will be able to create a Windows View but not a Web Object (Web Objects can only be created for a Web Application Project).

For more information see Create New.

Name

Enter the name of the template of wizard that is displayed in the Create New dialog for this entry.

File Name

Enter the file name of the template or wizard. Wizard files must be executable applications. For example "WinViewWizard.exe".

Large Image

Enter the filename of a bitmap file that is displayed in the Create New dialog for this entry. The set of system defined bitmaps for each file category is listed in the combo to make these images easily accessible. The selected icon is displayed to the right of the filename.

Long Description

Enter a description for the template or wizard. This description will be displayed in a box in the Create New dialog whenever the item is selected by the user.

Operations

Add

Click Add to add an entry to the currently selected file category.

Delete

Click Delete to remove the currently selected entry in the file category treeview. Note: system templates and wizards are read only. Library templates or wizards can only be removed from the imported library's workspace.

OK

Click OK to save changes and close the dialog.

Cancel

Click Cancel to close the dialog and discard all changes.

See Also

Create New


Configure Database Drivers

Use the Configure Database Drivers dialog to specify which database drivers should be loaded automatically. You can also edit the configuration file for each driver if it is available.

The treeview shows all the drivers that are currently loaded or available. Use this list to select a particular driver in order to edit its configuration.

The icons next to each driver indicate whether the driver is currently loaded or not. When the icon contains a red cross it indicates that that driver is not loaded.

Driver Name

Shows the full name of the currently selected driver.

Load on Startup

When this box is checked the currently selected driver will be automatically loaded when Visual DataFlex starts. Is the driver is not automatically loaded, Visual DataFlex will load any driver used by a specific table when that table is opened.

Load Now

Loads the currently selected driver.

Advanced

Activates a dialog for editing the driver configuration file (driver name.int) for advanced manipulation of driver settings.

OK

Click OK to save changes to the driver configuration and close the dialog.

See Also

Connectivity Kits


Driver Administrator Advanced Options

The Advanced Options dialog is used to edit the global configuration files for each database driver. To activate this dialog, you should select a driver in the Configure Database Drivers dialog, then click the 'Advanced…' button.

The name of the configuration file that you are editing is displayed in a status panel at the bottom of the dialog.

Refer to the specific driver's documentation for details of the configuration settings available for each driver.

OK

Click OK to save changes to the configuration file and close this dialog. Your changes will not be applied until the next time the driver is loaded.

Cancel

Click cancel to close the dialog without saving your changes.

See Also

Driver Configuration


Configure Tools Menu

Use the Configure Tools Menu dialog to add user defined items to the Tools menu.

Configure Tools Grid

Each item that you add to this grid will appear at the end of the Studio's Tools menu. Use the Add button to create an empty row then fill out each column appropriately.

Name

Enter the text that will be displayed in the Tools menu for the current row.

Command Line

Enter the command line that will be executed when the current row is selected in the Tools menu. You should enter the path and filename of an external program to be launched.

The general format of a command line should be the filename of an executable application followed by any command line parameters. For example:

"Notepad.exe" "Readme.txt"

This would launch the Windows Notepad accessory and passes it the command line parameter "Readme.txt".

"C:\VDF\Examples\Utilities\CodeMaintenance\Programs\CodeMaint.exe"

This would launch the Code Maintenance application in the specified directory.

The Studio also supports special formatting 'tags' in this command line for adding dynamic information to a command line. See Command Line Replacement Tags below for details.

Separator

Check this box to place a separator on the Tools menu above the current row.

Command Line Replacement Tags

The command line column of the Configure Tools grid supports a set of special tag strings that are evaluated and replaced by text each time the menu option is selected. The following tags strings are supported.

Tag | Replacement
<workspace> | This tag is replaced by the filename and path of the current workspace's configuration file. e.g. "c:\projects\orders\orders.sws"
<project> | This tag is replaced by the filename (without path) of the current project's source file. e.g. "order.src".
<file> | This tag is replaced by the filename and path of the file currently being edited in the Studio.

Note

Command line tags strings are case-insensitive.

Examples

Notepad.exe <file>

This would launch the notepad application and pass to it the filename and path of the file currently being edited in the Studio.

dbbuilder.exe –x<workspace>

This would launch the Database Builder tool and pass the parameter –x followed by the name and path of the currently open workspace .sws file (enclosed in double quotes).

Operations

Move Up

Click Move Up to move the currently selected row in the grid up one position in the menu.

Move Down

Click Move Down to move the currently selected row in the grid down one position in the menu.

Add

Click Add to add a new (empty) row to the Tools menu.

Remove

Click Remove to remove the currently selected row from the Tools menu.

OK

Click OK to save changes to the Tools menu and close the dialog.

Cancel

Click Cancel to close the dialog and discard all changes.


Window Menu

Cascade

Select this option to cascade all Editor and Designer MDI child windows.

Tile Horizontally

Select this option to tile horizontally all Editor and Designer MDI child windows.

Tile Vertically

Select this option to tile vertically all Editor and Designer MDI child windows.

Rotate Up

Select this option to rotate the next MDI child window in the z-order to the top.

Shortcut key Ctrl +

Rotate Down

Select this option to rotate the previous MDI child window in the z-order to the top.

Shortcut key Ctrl -

List Windows...

Select this option to list all open MDI child windows and perform operations such as selection, saving or closing. This activates the Window List dialog.

See Also

Menus


Window List

Use the Window List dialog to view a list of all MDI child windows currently open in the Studio. The dialog allows you to multi-select windows and save changes to them or close them. It also allows you to select any window and make it the topmost window.

Window List Grid

Each Code View or Designer View window that is currently open in the Studio is listed in this grid. Use this grid to select one or more windows.

File

This column shows the filename associated with the window plus an icon that represents the type of view.

Represents a Designer View window.

Represents a Code View window.

If the file requires saving, then this is indicated by super imposing a save icon over the view icon.

Path

This column shows the file path associated with the window.

Operations

Double-Click

Double-clicking one of the windows in the list will make it the topmost window and close the dialog.

Save

Click Save to perform a save operation on each selected file.

Close Window

Click Close Window to close each selected MDI child window.

Close

Click Close to close the dialog.


Help Menu

Help

Select this option to activate the Visual DataFlex help system for the Visual Studio.

Start Center

Select this option to activate the Start Center window.

Knowledge Base

Select this option to launch a browser and load the Data Access Technical Knowledge Base website.

About Visual DataFlex Studio

Select this option to activate the Studio's About dialog.

See Also

Menus


Start Center

The Studio Start Center guides developers though the steps needed to build solutions for the Windows desktop, for web deployment and web services. It helps developers do the right thing at the right time to make solution building fast and easy. Start Center…

  • Delivers readily-accessible information to help new users become productive quickly

  • Provides readily-accessible "how to" information for many common application requirements

  • Provides a direct, on-line interface to the latest product, feature and event information

  • Enables rapidly launching new application and component building tools and wizards in Studio

  • Enables rapidly opening existing application and component in Studio

  • Guides developers to up-to-the-minute on-line resources related to Visual DataFlex and other Data Access Worldwide products

  • Can be positioned anywhere on the developer's desktop that compliments his personal style (including outside the boundaries of the main Studio panel)

See Also

Docking Panels


About

The About dialog provides product information and allows you to access information about the machine the product is running on.

System Info

Displays a dialog box, which contains information about your Visual DataFlex installation and the current machine, such as operating system, processor, and memory.

See Also

Help Menu


Studio Toolbars

The Visual DataFlex Studio toolbars are organized into ten separate toolbars containing many options. Users are able to configure the visibility and position of each toolbar.

  • Standard Toolbar

  • Views Toolbar

  • Other Views Toolbar

  • Alignment Palette

  • Bookmarks Toolbar

  • Find Toolbar

  • Debug Toolbar

  • Debug Windows Toolbar

  • Tools Toolbar

  • Browser Toolbar

  • Help Toolbar

Enabling / Disabling Toolbars

To enable or disable a toolbar move the mouse over the toolbar region of the Studio and right-click to produce a context menu.

Check/un-check the individual toolbars that you wish to enable/disable.

The Studio toolbar configuration is saved per-user.

See Also

The Studio Desktop


Standard Toolbar

New File

Click this button to create a new project, file or component. The Create New dialog will be displayed.

For more information refer to Create New.

Keyboard shortcut Ctrl+N.

Open File

Click this button to open a file or a component belonging to the current workspace. The Open File dialog will be displayed.

Keyboard shortcut Ctrl+O.

Save File <file name.ext>

Click this button to save changes to the file that currently has the focus. The file name will appear in the tooltip.

Keyboard shortcut Ctrl+S.

Save all open files

Click this button to save all changes to every open file.

Cut

Cut text or object.

When you are editing in the Code Editor this option will cut the selected text to the clipboard. When you are using the Visual Designer, this option will cut the selected object(s) to the clipboard.

Keyboard shortcut Ctrl+X.

Copy

Copy text or object.

When you are editing in the Code Editor this option will copy the selected text to the clipboard. When you are using the Visual Designer, this option will copy the selected object(s) to the clipboard.

Keyboard shortcut Ctrl+C

Paste

Paste text or object.

When you are editing in the Code Editor this option will paste text from the clipboard. When you are using the Visual Designer, this option will paste object(s) from the clipboard as child object(s) of the currently selected object.

Keyboard shortcut Ctrl+V

Delete

Delete text or object.

When you are editing in the Code Editor this option will delete the selected text. When you are using the Visual Designer, this option will delete the selected object(s).

Keyboard shortcut Del

Undo

Undo last editing, or undo last operation.

When you are editing in the Code Editor this option will undo the last edit operation. When you are working in the Visual Designer, then this option will undo the operation.

Keyboard shortcut Ctrl+Z.

Redo

Redo the last undone operation.

When you are editing in the Code Editor this option will undo the last edit operation. When you are working in the Visual Designer, then this option will undo the operation.

Keyboard shortcut Ctrl+Y.

Print

Click this button to print the contents of the code editor for the currently selected file or component.

For more information refer to Print Options.

Keyboard shortcut Ctrl+P.

See Also

Toolbars


Views Toolbar

Code Editor

Click this button to display the current selected file in the Code Editor.

For more information refer to Code Editor.

Keyboard shortcut F7.

Visual Designer

Click this button to model the currently selected file in the Visual Designer.

For more information refer to Visual Designer.

Keyboard shortcut Ctrl+F7.

Workspace Explorer

Click this button to activate the Workspace Explorer.

For more information refer to Workspace Explorer.

Code Explorer

Click this button to active the Code Explorer.

For more information refer to Code Explorer.

DDO Explorer

Click this button to activate the DDO Explorer. This tool contains the DDO Structure Editor and the DDO Column Selector. The Structure Editor helps you to define the structure of data dictionary objects in a component. The Column Selector allows you to drag and drop table columns onto a component's visual design canvas.

For more information refer to DDO Explorer.

Opject Properties

Click this button to activate the Object Properties panel. Use this tool to view and edit the properties of the currently selected object.

For more information refer to Object Properties.

Keyboard shortcut Ctrl+3.

Class Palette

Click this button to activate the Class Palette. Use this tool to drag and drop various objects onto a component's visual design canvas.

For more information refer to Class Palette.

Keyboard shortcut Ctrl+4.

Window Navigator

Click this button to activate the Window Navigator.

For more information refer to Window Navigator.

See Also

Toolbars


Other Views Toolbar

Nudge Objects

Click this button to activate Nudge Objects.

For more information refer to Nudge Objects.

Keyboard shortcut Ctrl+7

Arrange Objects

Click this button to activate Arrange Objects.

For more information refer to Arrange Objects.

Keyboard shortcut Ctrl+8

Problem Resolution

Select this option to activate the Problem Resolution window.

For more information refer to Problem Resolution.

Keyboard shortcut Ctrl+9

Output Panel

Click this button to activate the Output Panel.

For more information refer to Output Panel.

Keyboard shortcut Ctrl+A+O

Find in Files Results

Click this button to activate the Find Results panel.

For more information refer to Find Results.

See Also

Toolbars


Alignment Palette

Left-Justify

All selected controls will align their left edge with the left edge of the first selected control, within a column.

Right-Justify

All selected controls will align their right edge with the right edge of the first selected control, within a column.

Top-Justify

All selected controls will align their top edges with the top edge of the first selected control, within a row.

Bottom-Justify

All selected controls will align their bottom edges with the bottom edge of the first selected control, within a row.

Equal-Space Horizontal

When aligning, the order that all controls are selected is significant. The positions of the leftmost and rightmost controls are stored. All controls are equally spaced within this horizontal distance. Note that you can re-arrange the controls by selecting in the desired order.

Equal-Space Vertical

When aligning, the order that all controls are selected is significant. The positions of the highest and lowest controls selected are stored. All controls are equally spaced within the vertical distance between these. Note that you can re-arrange the controls by selecting in the desired order.

Equal-Space Horizontal in Container

When aligning left-to-right, the order that all controls are selected is significant. The difference between this and "Left-To-Right" is the ability to adjust the width of the container, not the distance between the leftmost and rightmost selected objects.

Equal-Space Vertical in Container

When aligning, the order that all controls are selected is significant. The difference between this and "Top-To-Bottom" is the ability to adjust the height of the container, not the distance between the highest and lowest selected objects.

See Also

Toolbars


Bookmarks Toolbar

Toggle Bookmark

Select this option to bookmark the current line in the Code Editor. If the line is already book marked, then the bookmark is removed.

Keyboard shortcut Ctrl+F2

First Bookmark

Positions the Code Editor cursor at the first bookmark in the current file. The bookmarks are ordered top to bottom.

Previous Bookmark

Positions the Code Editor cursor at the previous bookmark in the current file. The bookmarks are ordered top to bottom.

Keyboard shortcut Shift+F2

Next Bookmark

Positions the Code Editor cursor at the next bookmark in the current file. The bookmarks are ordered top to bottom.

Keyboard shortcut F2

Last Bookmark

Positions the Code Editor cursor at the last bookmark in the current file. The bookmarks are ordered top to bottom.

Clear All Bookmarks

Clears all Code Editor bookmarks in the current file.

See Also

Toolbars


Find Toolbar

Find text

Click this button to activate the Find dialog. The Find dialog is used to locate a piece of text in the current file. If the specified text is found, then the current cursor position is moved to the location of the searched text.

Keyboard shortcut Ctrl+F

Find previous

Click this button to find the previous occurrence of the previously searched text.

Keyboard shortcut Shift+F3

Find next

Click this button to find the next occurrence of the previously searched text.

Keyboard shortcut F3

Find text in multiple files

Click this button to activate the Find In Files dialog. The Find In Files dialog is used to locate a piece of text in a set of different files. If the specified text is found, then each occurrence is listed in the find in files results panel.

Keyboard shortcut Ctrl+Shift+F

Find and replace text

Click this button to activate the Find & Replace dialog. The Find & Replace dialog is used to locate one or more occurrences of a piece of text in the current file and replace it with some other text.

Keyboard shortcut Ctrl+H

See Also

Toolbars


Debug Toolbar

Project Selector

This button displays the filename of the current workspace's current project.

The drop down list next to this button lists up to nine projects that belong to the current workspace. Selecting one of the projects from the list will make that paoject the new current project. If there are more than nine projects in the workspace then the final item in the list will activate the Select Project<Link> dialog.

If the workspace does not contain any projects then you can click this button to activate the Create New <link> dialog to create a new project.

Compile

Compiles the Current Project. The current project is compiled only if changes since last compile has been detected.

Run

Select this option to compile and run a project. The project is automatically only compiled first if necessary.

Pause

Pause lets you manually pause the program and enter break mode without a specific breakpoint. Execution will break immediately, and the program enters break mode. After which you can step through the program and the various debug windows are updated.

Continue

Continue leaves break mode and resumes execution until a breakpoint is encountered, or the program is manually paused.

Keyboard shortcut F5.

Step Over

Step Over executes the current line and stops on the following line, stepping over method calls.

Keyboard shortcut F10.

Step Into

Step Into executes the current line and stops on the next line encountered, stepping into any method call.

Keyboard shortcut F11.

Step Out

Step Out resumes execution until the current method returns to the calling method. Execution will break at the return point of the calling method. Stepping out of the current method call.

Keyboard shortcut F12.

Run To Cursor

Run to cursor resumes execution until the line where the cursor is located is reached.

Keyboard shortcut F6.

Go To Instruction Address

Find the corresponding source file and line for a specified instruction address.

Keyboard shortcut Alt+G.

Restart

Stops debugging and restarts the program, recompiling if necessary. Functionally equivalent to Stop followed by Run.

Stop

Ends the current debug session and stops the program. When the debugging is stopped, the Studio will automatically leave debug mode. This should not be confused with Pause.

Keyboard shortcut Shift+F5.

See Also

Debugging

Toolbars


Debug Windows Toolbar

Breakpoints

Click this button to display the Breakpoints window.

Message Trace

Click this button to display the Message Trace window.

Local Variables

Click this button to display the Local Variables window.

Global Variables

Click this button to display the Global Variables window.

Watches

Click this button to display the Watches window.

Tables

Click this button to display the Database Tables window.

Call Stack

Click this button to display the Call Stack window.

See Also

Debugging

Toolbars


Tools Toolbar

Launch Database Builder

Click this button to launch the Database Builder tool. Use Database Builder to construct your project's database tables and data dictionaries.

For more information refer to Database Builder.

Launch Database Explorer

Click this button to launch the Database Explorer tool. Use Database Explorer to browse the data in your project's database.

For more information refer to Database Explorer.

Launch the Web Application Administrator

Click this button to launch the Web Application Administrator tool. Use the Web Application Administrator to manage the VDF web application services that are running on your server.

For more information refer to the Web Application Administrator.

See Also

Toolbars


Browser Toolbar

Back

Click Back to return to the previously visited page in the Start Center.

Forward

Click Forward to return to the page the Start Center was displaying before clicking the Back button.

Stop

Click Stop to stop the Start Center from loading a page.

Refresh

Click Refresh to reload the current page in the Start Center.

Home

Click Home to display the Start Center's root page.

See Also

Toolbars


Help Toolbar

Help

Select this option to activate the Visual DataFlex help system for the Visual Studio.

Keyboard shortcut F1.

Start Center

Select this option to activate the Start Center window.

See Also

Toolbars


Docking Windows

The Visual DataFlex Studio uses professional Visual Studio 2005™ style docking windows for the main tools. These windows support the features you would expect from an enterprise class environment:

Nested Grouping

You can group windows in a tab style arrangement and display them in any arrangement docked to any side of the Studio desktop. The docking windows can be grouped together or docked inside one another to make the best use of available space.

Tear Off Tabs

The tabbed windows allow you to drag and "Tear Off" any of the individual tabs to create new windows that can either float or dock along the side of the Studio desktop. You can also drag and drop to combine windows which will create a new tab in each docking window. An outline is drawn to depict where your window will be located when you tear off or combine.

Sliding Auto Hide Windows

The Studio supports Auto Hide Panels that are similar to Visual Studio.NET and Microsoft Visio application environments. These Auto Hide Panels provide a unique way for you to make the most of the Studio desktop by hiding or showing windows with simple mouse movements.

Pinnable Windows

You can pin to your hidden windows, allowing them to stay visible. You can also press the pin to easily hide panes to allow for more area available to your workspace.

Float and Dock Windows

All windows can be floating or docking windows. You can easily float your docked window or dock your floating window to any side of the Studio desktop, or to any side of any docked window.

Drag-n-Drop Window Positioning

You can easily drag and drop any docking window or tab onto any dockable area such as any side of the Studio desktop or another docking window.

Active Window

The Studio provides visual clues as to which window is currently active or has input focus. When a window is active it caption area will highlight. This is noticeable in both docked and floating states.

Hide and Show Windows

The Studio allows you to easily hide and show windows to optimize your work area. You can hide your docked or floating windows at any time by pressing the small ‘x’ located at the upper right side of the caption area. You can also use the Studio's menus, toolbars and hotkeys to show various windows.

See Also

The Studio Desktop


Status Bar

The Studio status bar displays status information about various parts of the Studio. The content of the status bar panels varies depending on what action is currently being performed. Below is a description of each status panel from left to right:

Panel 1 – Filename

This displays the path and filename of the file currently being edited in the Code Editor or Visual Designer.

Panel 2 – Instruction Address \ Object Size

While debugging and the debugger is paused then this panel displays the instruction address associated with the current cursor position in the editor.

While using the Visual Designer this panel displays the size of the currently selected object.

Panel 3 – Cursor Position \ Object Location

While editing code this panel displays the current line and column number of the edit cursor.

While using the Visual Designer this panel displays the location of the currently selected object.

Panel 4 – Problem Indicator

If there are modeling problems in the current project then this panel displays the problem indicator icon. Clicking this icon will activate the Problem Resolution window.

Panel 5 – Drag Lock Indicator

If the current file has visually modeled objects and the Visual Designer is drag locked for that file then the drag lock indicator is enabled ( [image] ) in this panel.

Click in this panel to toggle the file's drag lock state.

Panel 6 – Read Only Indicator

If the current file is read only then the read only indicator is enabled ( [image] ) in this panel.

Panel 7 – Insert\Overtype

If the editor's text editing mode is insert then INS is indicated here. If the text editing mode is overtype then OVR is indicated.

Panel 8 – Capslock

If the keyboard's Capslock key is set then CAPS is indicated here.

Panel 9 – Num Lock

If the keyboard's Num Lock key is set then NUM is indicated here.


Studio Hotkeys

The following table list keyboard shortcuts that are available throughout the Studio.

For a list of keyboard shortcuts available in the code editor refer to Code Editor Keyboard Mapping.

General | Hotkey
Exit | Alt + F4
Help | F1
Studio Panels | Hotkey
Arrange Objects | Ctrl + 8
Class Palette | Ctrl + 5
Code Editor | F7
Code Explorer | Ctrl + 3
DDO Explorer | Ctrl + 4
Nudge Objects | Ctrl + 7
Object Properties | Ctrl + 2
Output Panel | Ctrl + Alt + O
Visual Designer | F7
Workspace Explorer | Ctrl + 1
Files | Hotkey
Create New | Ctrl + N
Open File | Ctrl + O
Print File | Ctrl + P
Save File | Ctrl + S
Compile, Debug & Run | Hotkey
Compile Project | F8
Continue | F5
Step Over | F10
Step Into | F11
Step Out | F12
Stop | Shift + F5
Restart | Ctrl + F5
Run | F5
Run to Cursor | Shift + F10
Go to Instruction Address | Alt + G
Finding | Hotkey
Find Text | Ctrl + F
Find Previous | Shift + F3
Find Next | F3
Find Text in Multiple Files | Ctrl + Shift + F
Find and Replace Text | Ctrl + H
Code Editor / Text | Hotkey
Comment/Uncomment | Ctrl + K
Context Help | F1
Cut Line | Ctrl + L
Indent | Tab
Lowercase | Ctrl + U
Move Line Down | Alt + Down
Move Line Up | Alt + Up
Outdent | Shift + Tab
Select Column Down | Shift + Alt + Down
Select Column Up | Shift + Alt + Up
Select Line | Ctrl + Alt + F8
Toggle/Record Macro | Ctrl + Shift + R
Toggle Whitespace | Ctrl + Alt + T
Uppercase | Ctrl + Shift + U
Refer to Code Editor Keyboard Mapping for more |
Code-Sense | Hotkey
Choose Command | Ctrl + D
Complete Word | Ctrl + Space
Parameter Info | Ctrl + Shift + Space
List Members | Ctrl + J
Insert current list item (or first item if no item is selected) | Ctrl + Enter
Breakpoints Window | Hotkey
Locate current breakpoint in editor | Enter
Remove Breakpoint | Del
Visual Designer | Hotkey
Move selected object(s) by one pixel | Arrow Keys
File Navigator | Hotkey
Close Current File | Del
Object Properties panel | Hotkey
Scroll through options combo list (if applicable) | Up / Down
Move column separator left | Ctrl + Left
Move column separator right | Ctrl + Right
Move down in properties list (in property name column) | Down
Move up in properties list (in property name column) | Up
Next window | Tab
Previous Window | Shift + Tab
Scroll through options combo list (if applicable) | Up / Down
Clipboard | Hotkey
Cut | Ctrl + X
Copy | Ctrl + C
Delete | Del
Paste | Ctrl + V
Redo | Ctrl + Y
Undo | Ctrl + Z

See also:

Code Editor Keyboard Mapping

Studio Desktop


Code Editor

The Code Editor

Use the Code Editor to create and edit source code files.

Different file types that you open in the editor will support different editing features. For example, if you open a Visual DataFlex source file the Code Editor will provide color syntax highlighting specific to Visual DataFlex language syntax. For more information see File Types.

Opening a File in the Code Editor

Files can be opened in the Code Editor in the following ways:

  • Activate the Open File dialog via the toolbar or Open File(s) option on the File menu.

  • Activating the Create New dialog via the toolbar or New option on the File menu.

  • Dragging and dropping a file from Windows Explorer.

  • Double-clicking a file in Workspace Explorer.

Overview of Features

The Code Editor supports a wide range of editing features such as:

  • CodeSense. CodeSense is a set of Studio features that intelligently assist you in writing code, providing lists of context sensitive options and information.

  • Color Syntax Highlighting. Language-specific keywords, comments, and strings are colored differently to set them apart from plain text.

  • Drag and Drop Text Manipulation. Highlighted text can be dragged and dropped between any window supporting OLE text Drag and Drop. Text may be copied or moved.

  • Highlighting of block-starting and ending commands. If you place the cursor on a block-starting command, such as begin, the matching block-ending command, such as end, will be highlighted. You can also easily navigate between a block-starting and ending command by pressing Ctrl + ] on the keyboard when such a command is highlighted.

  • Matching parentheses highlighting. When the caret is positioned immediately after a beginning or ending parenthesis, ( or ), the matching ending or beginning parenthesis, ) or (, respectively, is highlighted. The same works for beginning and ending square [ ] and curly { } brackets.

  • Multiple Split Views. You can create up to four separate views of the same edit buffer. Each view can be scrolled independently.

  • Unlimited Undo/Redo. All edit actions are fully undoable and redoable.

  • Column Selection and Manipulation. Columns of text can be selected with the mouse (alt+drag) and then manipulated. Empty columns (columns with a width of zero characters) can be selected, causing subsequent typing and deletion to occur over multiple lines at the same time.

  • Automatic indenting and outdenting. DataFlex block-starting commands, such as "Begin" will automatically indent the following line. Commands, such as End, will automatically un-indent the "End" thereby retaining correct indentation for the language.

  • Search & Search/Replace. Powerful search and replace functionality is provided including features such as bookmarking all occurrences of a find and replacements respecting the case of the replaced word.

  • Bookmarking. Up-to ten bookmarks are supported. Bookmarks permit a position in the source to be marked and returned to later with a simple key-combination.

  • Toggle Whitespace. Toggle the display of "whitespace" (show spaces, etc.).

  • Toggle Case. Uppercase/lowercase the marked block.

  • Comment/Uncomment. Comment/UnComments the marked block.

  • Code Complete. Automatic Code Completion.

  • Context-Help relative to the caret.

See Also

CodeSense

Code Editor Mouse Actions

Code Editor Keyboard Mapping

Code Editor Context Menu

Finding and Replacing Text

Searching for Text in Multiple Files

Macro Recording

Configure Editor


CodeSense

CodeSense is a set of Studio features that intelligently assist you in writing code, providing lists of context sensitive options and information. Using CodeSense dramatically increases productivity, it gives you context sensitive information directly when you need it as you're typing code in the editor, so you don't have to leave the editor to look up references in the documentation. And it can even be used to complete your typing for you, minimizing typos etc.

CodeSense comprises the following features:

List Members

Ctrl+J

Displays a context sensitive list of available source code commands, classes, data types, methods, variables, constants, objects, etc. The list is context sensitive, and contains only the appropriate options for the context where it's invoked. Selecting an option from the list inserts the appropriate code in the editor.

The CodeSense list is invoked automatically as you're typing certain source code constructs, such as typing a struct variable name followed by dot for example, and it can also be invoked manually at any time by pressing Ctrl+J, to provide a list of valid options within the context.

Code Complete

Ctrl+Space

Auto-completes the word you're typing by filling in the rest of the variable name, method name etc. as soon as you have entered enough characters to disambiguate the term within the current context. Just type the first few letters of the name, and then press Ctrl+Space to invoke Code Complete. If what you have typed has more than one possible match or no match at all, Code Complete automatically displays a list of valid options by invoking List Members as above.

Parameter Info

Ctrl+Shift+Space

Displays a tooltip with information about the parameters for the current method call. The current parameter is displayed in bold and automatically advanced as you type. Parameter Info is available for all functions, procedures, and properties of all classes and objects, and built-in language functions as well as external functions.

The Parameter Info tooltip is automatically displayed when typing a method call, such as using the Get, Set, or Send command, or within an expression. Parameter Info can also be manually invoked at any time within a valid parameter block of a method call context, by pressing Ctrl+Shift+Space.

Quick Info

Displays a tooltip with information about the symbol under the cursor. Quick Info gives you quick access to brief information about variables, classes, objects, methods etc. If there are multiple hits for the specified symbol, they will all be displayed.

Quick Info can be invoked by hovering the mouse cursor over a word in the editor.

Auto Complete

Auto-completes code snippets by automatically closing the curent scope using the appropriate closing scope text, or automatically inserting other text. For example, typing Procedure followed by space automatically inserts End_Procedure in the appropriate location. Augmenting a method by typing the Procedure/Function followed by the method name and space, automatically inserts the parameters from the augmented method.

Go To Definition

Locates the definition of the symbol under the cursor. Go To Definition lets you quickly find the definition of a specified symbol, by opening the file and locating the definition for classes, methods etc. Just right-click the superclass name in a Object or Class declaration for example, select Go To Definition and it will take you directly to the superclass definition, opening the file and locating the line of code for the definition.

Object Browser

The Object Browser CodeSense list gives you a focused list of methods for the specified object, so you can easily find and select a method of a particular object. After selecting a method, CodeSense automatically completes the method call to the specified object by additionally inserting the appropriate object access code after the specified method name.

The Object Browser can be invoked in Get, Set, and Send commands, as well as in expressions. For example: Get <Ctrl+Space> and then select Browse Objects at the very top of the list.

Using CodeSense

CodeSense information is available for practically every language command, all classes, objects, methods, variables, struct types etc., including your own classes and methods from your source code. CodeSense information is always up to date, as soon as you declare a variable, or add a Use statement, for example, the information is immediately available.

Video clips demonstrating CodeSense:

Using CodeSense in a method call.

Using CodeSense with auto-complete.

Using CodeSense with the object brower.

Using CodeSense with variables and struct types.

More examples of using CodeSense:

Get <Ctrl+Space>

displays a CodeSense list of all available functions.

Send Foo to <Ctrl+Space>

displays a CodeSense list of all available objects.

Move <Ctrl+Space>

displays a CodeSense list of all available variables and constants.

Move abc to <Ctrl+Space>

displays a CodeSense list of all available variables that can be assigned.

<Ctrl+Space>

on the beginning of a line displays a CodeSense list of all available language commands and data types, including your own data types.

See Also:

Code Editor


Using CodeSense in a Method Call

Overview | Next

This video clip demonstrates how CodeSense can assist typing the name of the method, the object, and variables. The CodeSense list displayed is context sensitive, suggesting method names in the first case, objects etc. in the second instance, and variables etc. suitable for assignment in the third case.


Using CodeSense with Auto-Complete

Overview | Previous | Next

This video clip demonstrates how CodeSense automatically inserts End_Procedure in the correct location after you have typed Procedure followed by space. It also shows how CodeSense suggests existing methods of the superclass that you can augment/override. And finally it shows how the parameters for the augmented method are automatically inserted based on the superclass definition of the method.


Using CodeSense with the Object Browser

Overview | Previous | Next

This video clip demonstrates how you can use the Object Browser to select an object and browse a filtered list of methods available for the specific object. It also shows how CodeSense automatically inserts the code for calling the selected method of the specified object. And it shows how CodeSense can assist with variables/constants etc. for parameters.


Using CodeSense with Variables and Struct Types

Overview | Previous

This video clip demonstrates how CodeSense can assist you with variable names and struct members etc. in practically every language command. It also demonstrates how the CodeSense lists narrows in on the target word using automatic incremental search.


Code Editor Mouse Actions

The Code Editor supports the following mouse actions:

Mouse Action: | Result:
Hover over text | Quick Info
L-Button click over text | Changes the caret position
R-Button click | Displays context menu
L-Button down over selection, and drag | Moves text
Ctrl + L-Button down over selection, and drag | Copies text
L-Button click over left margin | Selects line
L-Button click over left margin, and drag | Selects multiple lines
Alt + L-Button down, and drag | Select columns of text
L-Button double click over text | Select word under cursor
Spin IntelliMouse mouse wheel | Scroll the window vertically
Single click IntelliMouse mouse wheel | Select the word under the cursor
Double click IntelliMouse mouse wheel | Select the line under the cursor
Ctrl + Spin IntelliMouse mouse wheel | Increase or decrease text font size
Click and drag splitter bar | Split the window into multiple views or adjust the current splitter position
Double click splitter bar | Split the window in half into multiple views or unsplit the window if already split

See Also:

Code Editor


Code Editor Keyboard Mapping

The Code Explorer's Editor supports default shortcut keystrokes. Listed below is the complete set of default keystrokes and the Editor command that each keystroke maps to.

Legend:

  • Extend means that the text selection is extended.

  • Extend Col means that the text selection is extended as a column-based selection.

Command | Keystroke
Bookmark Next | F2
Bookmark Prev | Shift + F2
Bookmark Toggle | Ctrl + F2
Char Left | Left
Char Left Extend | Shift + Left
Char Left Extend Col | Shift + Alt + Left
Char Right | Right
Char Right Extend | Shift + Right
Char Right Extend Col | Shift + Alt + Right
Choose Command | Ctrl + D
Comment Selection | Ctrl + /
CodeSense: complete word or pop up list | Ctrl + Space
CodeSense: parameter info tooltip | Ctrl + Shift + Space
Context Help | F1
Copy | Ctrl + C
Copy | Ctrl + Insert
Cut | Shift + Delete
Cut | Ctrl + X
Cut Selection | Ctrl + Alt + W
Delete | Delete
Delete Back | Backspace
Document End | Ctrl + End
Document End Extend | Ctrl + Shift + End
Document Start | Ctrl + Home
Document Start Extend | Ctrl + Shift + Home
Find | Alt + F3
Find | Ctrl + F
Find Incremental Down | Ctrl + I
Find Incremental Up | Ctrl + Shift + I
Find Next | F3
Find Next Word | Ctrl + F3
Find Prev | Shift + F3
Find Prev Word | Ctrl + Shift + F3
Find Replace | Ctrl + Alt + F3
Find Replace | Ctrl + H
Go To Line | Ctrl + G
Go To Match Brace | Ctrl + ]
Help | F1
Home | Home
Home Extend | Shift + Home
Indent Selection | Tab
Line Cut | Ctrl + L
Line Down | Down
Line Down Extend | Shift + Down
Line Down Extend Col | Shift + Alt + Down
Line End | End
Line End Extend | Shift + End
Line Open Above | Ctrl + Shift + N
Line Up | Up
Line Up Extend | Shift + Up
Line Up Extend Col | Shift + Alt + Up
Lowercase Selection | Ctrl + U
Next file | Ctrl + +
Page Down | Page Down
Page Down Extend | Shift + Page Down
Page Up | Page Up
Page Up Extend | Shift + Page Up
Paste | Ctrl + V
Paste | Shift + Insert
Previous File | Ctrl + -
Properties | Alt + Enter
Record Macro | Ctrl + Shift + R
Redo | Ctrl + Shift + Z
Redo | Ctrl + Y
Select All | Ctrl + A
Select Line | Ctrl + Alt + F8
Select Swap Anchor | Ctrl + Shift + X
Sentence Cut | Ctrl + Alt + K
Sentence Left | Ctrl + Alt + Left
Sentence Right | Ctrl + Alt + Right
Set Repeat Count | Ctrl + R
Toggle Overtype | Insert
Toggle Whitespace Display | Ctrl + Alt + T
Uncomment Selection | Ctrl + /
Undo | Ctrl + Z
Undo | Alt + Backspace
Unindent Selection | Shift + Tab
Uppercase Selection | Ctrl + Shift + U
Window Scroll Down | Ctrl + Up
Window Scroll Left | Ctrl + PageUp
Window Scroll Right | Ctrl + PageDown
Window Scroll Up | Ctrl + Down
Word Delete To End | Ctrl + Delete
Word Delete To Start | Ctrl + Backspace
Word Left | Ctrl + Left
Word Left Extend | Ctrl + Shift + Left
Word Right | Ctrl + Right
Word Right Extend | Ctrl + Shift + Right

See Also:

Code Editor

Studio Hotkeys


Code Editor Context Menu

The Code Editor provides a context menu offering shortcuts to frequently used operations:

Go To Definition

Opens the file where the selected method, class, variable, property, etc. is defined and positions the cursor at the beginning of the definition.

Open file under cursor

Analyses the text under the mouse cursor to see if it can locate a corresponding file name. If a corresponding file is found then it is opened.

Switch to designer

Opens the Visual Designer for the current file.

Shortcut key F7

Locate in Code Explorer

If the cursor is positioned inside a code structure that is represented in the Code Explorer then the corresponding item in the Code Explorer treeview is selected.

Shortcut key Ctrl+F7

Run to cursor

While debugging a program, causes the program to run to the line of code that the cursor is on.

Shortcut key Shift+F10

Breakpoint Set\Remove

Sets a breakpoint on the current line. If the current line already has a breakpoint, then this breakpoint is removed.

You can also set or remove a breakpoint by clicking in the editor margin. See also Breakpoints Window.

Shortcut key F9

Breakpoint Enable\Disable

If the current line contains a disabled breakpoint then this enables the breakpoint. If the current line contains an enabled breakpoint then this option disables the breakpoint. If no breakpoint exists on this line then an enabled breakpoint is created. See also Breakpoints Window.

Shortcut key Ctrl+F9

Cut

Cuts the selected text to the clipboard.

Copy

Copies the selected text to the clipboard.

Paste

Pastes text from the clipboard.

Undo

Undoes the last change.

Redo

Redoes the last change that was undone.

Add Component to Project

If the current file is a component file and does not yet belong to the current project then this option will add the component to the current project.

For more information see Workspace Explorer.

Properties…

Activates up the Editor's configuration dialog.

See Also

Code Editor


Finding Text Using Regular Expressions

Regular Expression Syntax Rules

The editor's Find and Find & Replace operations support using regular expressions when specifying the text that is to be searched.

The Studio's regular expression implementation is a partial implementation of Perl regular expressions. The following syntax rules are supported:

Metacharacters

\ Quote the next metacharacter

. Match any character

| Alternation (OR’d expression)

() Grouping

[] Set of characters.

For example, ”[0123a-z]” will match 0, 1, 2, 3 and all lowercase alphabet characters.

If first character is ‘^’, none of the specified characters must be present in order to match.

^ Match the beginning of the line.

$ Match the end of the line

Quantifiers (greedy)

* Match 0 or more times

+ Match 1 or more times

? Match 0 or 1 times

{n} Match exactly n times

{n,} Match at least n times

{n,m} Match at least n but not more than m times

By default, a quantified subpattern is “greedy”, meaning it will match as many times as possible while still allowing the rest of the pattern to match. If you wish for a regular expression to match the minimum number of times possible, follow the quantifier with a question mark (‘?’).

Quantifiers (non-greedy)

*? Match 0 or more times

+? Match 1 or more times

?? Match 0 or 1 times

{n}? Match exactly n times

{n,}? Match at least n times

{n,m}? Match at least n but not more than m times

Escape Sequences

\t Match a tab character

\w Match a "word" character (alphanumeric plus "_")

\W Match a non-"word" character

\s Match a whitespace character

\S Match a non-whitespace character

\d Match a digit character

\D Match a non-digit character

\b Match a word boundary

\B Match a non-(word boundary)

\a Match only at beginning of line

\z Match only at end of line

See Also

Find

Find & Replace

Code Editor


Macro Recording

You can create up to ten keyboard macros in the editor. You assign each macro to a keyboard shortcut, which will be remembered the next time you start the Studio.

Recording a Macro

To start recording a macro, press the Record Macro keyboard shortcut (Ctrl +Shift +R) or click the record macro toolbar button. A "Recording" button will be displayed in the upper right corner of the editor.

Any keyboard operations you now perform in the editor will be recorded into the macro. To finish recording the macro, click the "Recording" button.

Saving a Macro

When you stop recording the macro, a dialog will be displayed asking you to assign a key to the macro:

Press new shortcut key

In the "Press new shortcut key" dialog, press the key combination you want to associate to the macro. You can use up to two keys. For example, you could press Ctrl+A and then T. In the editor, you would then need to press Ctrl+A followed by T to replay the macro. This could be a useful technique if you wanted to apply all your macros to a single "leading" key and followed by another identifier.

Save As

The Save As window will let you select a macro number to use. Up to ten macros can be saved. Typically, when creating new macros you just let the dialog automatically select the first free number. However, if you wanted to add an extra key combination to an existing macro, you could select the macro number from the list.

Note that, in this case, the previous key combination will still be available and will perform the keystrokes of the last combination recorded. For example, if your keystrokes were to delete 10 characters and you saved that macro assigning Crtl+Z, D to macro 1 and then you recorded deleting 20 characters and saved that as Ctrl+Alt+Z, D to the same macro 1, both key combinations (Ctrl+Z, D and Ctrl+Alt+Z, D) will delete 20 characters - the last recorded keystrokes to macro 1.

To save the macro, press the OK button. The next time you start the Studio, your macros and keys will be available for use.

Macros Currently Saved

To check what macros you recorded and you currently have available in your editor, you can:

  • Drop down the list in the Save As window when recording a new macro

  • Use the Configure Editor dialog (see Note below), Keyboard tab page and look for "PlayMacro<n>" under Command. Where <n> - in the range from 1 through 10 - will be the number you selected when saving the macro. All macros recorded will be saved to PlayMacro<n> and the associated key combinations will be displayed in Key Assignments.

Note: To get to the Editor Properties: In the Editor, right-click and select Properties from the floating menu.

Removing Saved Macros

You need to use the Configure Editor dialog to remove saved macros.

  • From the Configure Editor dialog, select Keyboard tab page

  • Look for "PlayMacro<n>" under Command, where <n> - in the range from 1 through 10

All the recorded macros, identified by PlayMacro<n>, will be listed under Command - i.e. you will find PlayMacro1, PlayMacro2,…, PlayMacro10.

The key combinations for each PlayMacro will be displayed in Key Assignments. To remove one of the key combinations, just highlight it and press the Remove button.

The Reset button will restate the default value of all the keys listed. Since the PlayMacros by default have no keys assigned to them, the Reset button will clear all recorded macros.

See Also

Code Editor


Configure Editor

Use the Configure Editor dialog to customize the Studio editor.

The dialog is divided into four tab pages:

  • Color/Font

  • Language/Tabs

  • Keyboard

  • Misc

OK

Click OK to save changes to the editor configuration and close the dialog.

Cancel

Click Cancel to close the dialog and discard changes to the editor configuration.

Apply

Click Apply to apply the changes you have made so far without closing the dialog.

See Also

Configure Studio


Configure Editor – Color/Font

Use this tab page to customize the font attributes for each registered file type supported by the Studio.

Tokens Sets

The treeview control lists each registered language definition plus some miscellaneous text attributes. Each language definition corresponds to one of the file types supported by the Visual DataFlex Studio.

Expanding a language item in the tree reveals a list of token sets defined for that language. To change the font attributes for all tokens belonging to a token set select the token set in the tree and modify the font attributes using the Color, Background and Font Style described below.

Color

Use this combo list to select the color used to render the font for the selected token set. The final item in the list "More Colors..." will activate the standard Color Picker dialog.

Background

Use this combo list to select the background color used for the selected token set. The final item in the list "More Colors..." will activate the standard color picker dialog.

Font Style

Use this combo to select a font style such as bold, italic, underline etc for the selected token set.

Font

To change the font used to render all text in the editor click the [...] button next to the Font text box. This will activate the standard Font dialog. Note, you do not need to select any token set as the font is applied to all text.

See Also

Configure Editor

Studio File Types


Configure Editor – Language/Tabs

Use this tab to customize the editor behavior for each registered file type supported by the Studio.

Language

Use this combo form to select one of the registered languages. After selecting a language you can proceed to edit the editor behavior for that language.

Adjust text casing while typing language keywords

Check this box for the editor to adjust the case of each language keyword in the line you are editing. Each registered language defines a set of keywords and how the case of each keyword will be cased. For example if you are editing a Visual DataFlex source file then the following text line...

WHILE (X > 0)

would be converted to...

While (X > 0)

Auto indentation style

Specifies how text inside a block of scope keywords will be indented by the editor.

Off

Select Off to disable auto indentation for the selected language.

Follow Language Scoping

Select this option for automatic indentation when entering a code block and automatically un-indent when closing the block. For example if you are editing a Visual DataFlex source file and type the following text...

While (X > 0)

Decrement X

Loop

then the editor would format this as...

While (X > 0)

Decrement X

Loop

Copy from previous line

Select this option to specify that the indentation level of each new line should be copied from the previous line.

Statement Completion

Auto list members

Check this box to enable displaying automatic CodeSense member lists after certain language keywords.

Parameter Information

Check this box to enable automatic parameter information tool tips when typing a call to a function of procedure.

Tabs

Tabs Size

Controls the number of vertical character positions for each indentation level.

Convert tabs to spaces while typing

Check this box to ensure that text is always indented using space characters and never using tab characters.

See Also

Configure Editor

Studio File Types


Configure Editor – Keyboard

Use this tab page to customize the editor's hotkey assignments.

Command

This list box contains each possible editor command that can be assigned to a keyboard shortcut. To assign or change a hotkey to one of these commands you must first select the command in this list.

Description

This text box displays a description of the selected command.

Key Assignments

This lists the set of hotkey combinations currently assigned to the selected command. Each command may have 0, 1 or more hotkey combinations assigned to it.

To remove one of the hotkey assignments, select it in the list and click the Remove button.

To reset the selected command's hotkeys to the default, click the Reset button.

New key assignment

Enter this field and press the key combination you would like to assign to the selected command. For example pressing "Alt+Q" would add this hotkey combination to the currently selected command.

The text box below this displays information about the current use of the new key assignment. i.e. is it currently assigned to some other editor command?

To complete the hot key assignment you must click the Assign button. Do not forget to close the dialog button using the OK button, not the Cancel button.

Special Note

You may not assign a hotkey combination that is already used by some Studio operation outside the editor.

See Also

Studio Hotkeys

Configure Editor


Configure Editor – Misc

Settings

Smooth scrolling

Check this box to scroll text smoothly in the editor (one pixel at a time).

Show left margin

Check this box to show the editor's left margin. The left margin is used to display bookmark and breakpoint icons and the current line indicator when stepping through code while debugging.

Line tooltips on scroll

Check this box to display a tooltip containing the closest line number when dragging the vertical scrollbar.

Enable virtual space

Check this box to allow the cursor to be vertically positioned beyond the last character of the current line. This option is useful if you prefer the cursor's vertical position to be retained when moving up or down rows regardless of the line length.

When this option is enabled and you press enter to create a new line while the cursor is positioned beyond the last character of the current line, then spaces will be added to that line to pad it to the vertical position where you pressed enter.

Color syntax highlighting

Check this box to enable color syntax highlighting of language tokens.

Show horizontal scrollbar

Check this box to display the editor's horizontal scrollbar.

Show vertical scrollbar

Check this box to display the editor's vertical scrollbar.

One click URL Navigation

Check this box to enable navigating to a URL by clicking a URL string.

Copy RTF text to clipboard

Check this box to copy text to the clipboard in rich text format.

Brace matching

Check this box to enable the editor's brace matching feature. Brace matching means that whenever the cursor is positioned in or behind a token representing one of a pair of braces or scope start/end keywords then the starting token and matching ending token are highlighted.

Max undoable actions

Unlimited

Select this option for unlimited undo action support.

Limited to

Select this option to specify the maximum number of undoable actions.

Line numbering

Use these options to control line numbering.

Style

Choose the line numbering style from one of: Binary, Octal, Decimal, Hex. Select <none> to turn off line numbering.

Start at

Enter the line number to display for the first line in each file.

Track selection in bold

Check this option to bold the line number of the current line.

See Also

Configure Editor


Select Target for Find Definition

The Select Target for Find Definition dialog is activated when you perform a Goto Definition operation in the editor and there are multiple possible definitions of the chosen symbol.

Target List

This list shows each definition in the current project of the symbol. Each entry of the list shows the line of code where the symbol is defined followed by the filename (in braces) that the line of code belongs to.

Load a target by double clicking one of the items in the list, or by selecting one of the items and clicking OK.

OK

Click the 'OK' button to load the selected target definition in the Code Editor.

Cancel

Click the 'Cancel' button to close the dialog without loading any definition in the Code Editor.

See Also

Find In Files


The Visual Designer

The Visual Designer is used to visually model Windows project components such as views and lookup lists. The Studio expects that a single component will be created in a single file. From the standpoint of the Visual Designer, the terms file and component can be used interchangeably.

When a file is loaded and as it is changed the Studio will determine if a file contains a component that can be visually modeled. If it can, it will be displayed. If it cannot, the designer will display a message explaining why the file is not visually modeled. For more information about visual modeling, see “How The Studio Visually Models Objects”.

A component is represented in the Visual Designer as an MDI child window. The client area inside this window will contain all of the other objects that can be visually modeled in the component.

WYSIWYG Modeling

When you are modeling the components of a Windows project, most of the objects will have a visual representation in the running application (e.g. a button object). The Visual Designer will model these objects "what you see is what you get" (WYSIWYG) style.

If the Studio knows how to visually model an object it will do so. It determines if the object can be modeled by checking its class. A class is associated with a visual object by its DesignerClass meta-tag setting. If the meta-tag exists and the studio can model the designer class, the object will be modeled. If a class can not be visually modeled, it will not appear in the Visual Designer.

Using the Visual Designer

Objects on the visual design canvas can be created, destroyed, moved, re-sized and edited using the mouse and keyboard. A variety of views and tools are available in the Studio for manipulating objects in the Visual Designer. Refer to the see also section below for details.

The Visual Designer Context Menu, which is invoked by selecting any object in the designer and pressing the right mouse button, provides access to many of the capabilities of the designer.

The Visual Designer, the Code Editor and Code Explorer

The Visual Designer and the Code Editor are both representations of the same file. These representations are called “views”. When changes are made in the Visual Designer, those changes are immediately made to the code editor. When changes are made in the code editor, those changes are eventually made to the Visual Designer. (Since code editor changes occur at the character-by-character level you do not want those changes to be immediately applied to other clients such as the Visual Designer.)

Because selections in the editor and the designer are closely related an easy mechanism is provided for switching between a File’s Code Editor and Visual Designer views. Pressing the F7 key in either client switches to the other. Double clicking on any object in the Visual Designer will switch to Code Editor. When you switch from the Visual Designer to the Code Editor, the source code for the current selected object will be shown.

The connection between the Visual Designer and the Code Editor is best seen and understood by looking at the Code Explorer Panel. The Code Explorer shows all objects, methods, etc. in a tree view. If any node (object, method, etc.) is selected, it will also be selected in the Code Editor and the Visual Designer. The Editor will locate the code that represented by the node. The Visual Designer will attempt to locate the object associated with the node. We use the word “attempt” because the node may not be something that can be represented in the designer (e.g., a class, an use statement, a non-visual object).

Undo and Redo in the Visual Designer

Every operation performed in the Visual Designer can be reversed via Undo and Redo. These operations can be performed from the Visual Designer or from the Code Editor.

Note that once a change has been made within the Code Editor, the Visual Designer can no longer Undo/Redo these operations. This restriction exists because the code editor is capable of making changes at a level smaller than designer can handle (i.e., it can change single characters). However, the changes made in the designer or the editor can always be reversed from the editor.

For example, let’s say you performed a number of Visual Designer operations. You can undo and redo any of these operations in the Visual Designer. Now you change something in the code editor. You can no longer perform undo/redo operations in the designer. You can, however, switch to the editor and perform undo/redo operations there. You can undo the changes made in the editor and you can undo changes made in the designer.

See Also

How The Studio Visually Models Objects

Selecting Objects

Dragging, Dropping and Resizing Objects

The Visual Designer Context Menu

Object Properties

Class Palette

DDO Explorer

Locking Objects

The Background Resolution Grid

The Code Editor

The Code Explorer


How The Studio Visually Models Objects

A file can be visually modeled in the Visual Designer if the following conditions are met:

  • The file resides in the workspace’s make-path

  • The file contains objects that can be visually modeled

  • The file contains no modeling errors

The file resides in the Workspace

If the file is not a member of the workspace, the Visual Designer view cannot even be loaded for the file. If you attempt to load the designer, a message box error will appear explaining that the file is not a member of the workspace.

The file contains objects that can be visually modeled

Before a file is modeled, the Studio parses the file. As needed it will also parse all files that this file uses and, if the file is a member of the current project, all files that are part of the current project. It uses this information to determine if the file can be visually modeled.

An object can be modeled if it is based on a class that supports visual modeling. Classes contain a meta-data tag named DesignerClass, which associates objects based on the class, or one of its subclasses, with designer classes known to the Visual Designer. When an association exists, the object can be modeled.

If a file can be modeled at all, one of its root level objects must be modelable. If the file does not contain any root level objects that can be visually modeled, the Visual Designer will display the message:

No Objects to Model

Currently none of the objects in this component can be visually modeled

If the file does not contain a root level object that can be visually modeled, that will be considered to be your “component” and that object and all if its children will be displayed. Only one component can be modeled in the Visual Designer and that will be the first one encountered.

The file contains no modeling errors

If certain errors exist in your file, the Visual Designer may decide that it cannot be modeled. When that happens the Visual Designer will display a message that should help you find the problem. Also, when this happens, the Problem Resolution panel can be used to locate problems.

Some of the conditions that can occur are:

Structural Errors

Some structural source code errors make it impossible for the Visual Designer to understand your code’s structure. Most of these types of errors are mismatched block command errors. For example, your code may contain an object command without a corresponding end_object command. If the Visual Designer encounters this anywhere within the file, it will not attempt to model the file until the errors have been corrected. The designer will instead, display the message:

Source Code is not structured properly

Errors in your source code makes it impossible to visually model objects

File is not part of the current project

If your file is not part of the current project it may or may not be modelable. If the file is not part of the current project and it contains any class (or super class) that is not defined by the file or one of the files it uses, that file is considered to be incomplete and it will not be modeled. The designer will instead display the message:

File is not part of the current project

This file or one of the files it uses contains undefined classes. This might be an error, such as a missing "use" statement, or the missing classes may be defined in a project that this file actually belongs to. Switching to that project or adding this file to the current project may allow this file to be visually modeled.

When this occurs this can be remedied in one of two ways:

  • You can change the current project so to a project that this file belongs to. The project may provide the missing class definition. Even if it does not, it can be modeled.

  • The better solution is to change your file so that the file or one of the files it uses provides all classes required for this file. This usually involves adding use statements to the file or one of the files it uses. The makes the file autonomous, which results in more robust (and modelable) components. The Problem Resolution panel can be used to locate problems.

Of Special Note

If a file is a member of the current project, the Visual Designer is more relaxed in its handling of unknown classes. If the class is unknown, the designer assumes that this is a real error that must be corrected, as the project cannot be compiled. It will still attempt to model you component but it will skip objects derived from the missing class. The designer can do this because it knows how to accurately handle this certain error (it skips the object). When the same file is not part of the current project, it does not know how to handle what may or may not be an error.

It is therefore advised that you always model files that are part of the current project.

See Also

The Visual Designer

Problem Resolution


Selecting Objects

To be able to work with an object in the Visual Designer, you need to select it. After an object is selected, you are able to:

  • See its properties in the Object Properties Panel

  • Invoke its Context menu

  • Drag the control to change its location or change its size

Selecting a Single Object

When an object is selected, its physical appearance will alter to show "grab handles" around it. These grab-handles can be used to resize and move the object (see Dragging, Dropping and Resizing Objects).

When a single object is selected, the status bar is updated to show objects size and location.

Selecting Multiple Objects

Objects can also be multi-selected. When you do this, the grab-handles change color, to indicate that you have more than one object selected.

If you have multiple selected objects, dragging one object will drag all objects at the same time. Multiple selected objects can be resized and located using the keyboard.

How to Select Objects

There are three ways to select objects:

Selecting by Mouse-Click

Single Select

To select an object with the mouse, position the mouse cursor over the required object in the Visual Designer and click the left mouse-button. Any other objects you had selected will automatically be deselected.

Multi Select

You can use the ctrl key when selecting with the mouse-click to add more objects to those already selected. Only objects at the same nesting level can be (i.e. all children of the same parent) can be multi-selected

Lasso-Selecting

You can use the lasso technique to select either a single object, or a group of objects. You lasso objects by holding the Shift key, then clicking the left mouse-button on the visual design canvas while you move the mouse cursor. As you do this, a lasso band will be drawn across the underlying objects. Any object that falls within the lasso will be selected when you release the left mouse-button.

Only objects at the same nesting level can be (i.e. all children of the same parent) can be multi-selected

Note: Some of the alignment tools use the first selected object as an anchor for alignment. If you use the lasso, the first control will be arbitrary, so if you intend to use those tools, you should use the mouse to individually select the objects in the order you need them.

Code Explorer

The Code Explorer can also be used to select any object in a Component.

See Also

The Visual Designer

The Visual Designer Context Menu


Dragging, Dropping and Resizing Objects

Dragging and Dropping Objects

Objects are created in the Visual Designer by using the DDO Explorer’s Table/Column Selector or the Class Palette. Both of these support a drag and drop interface. Select the object or objects you wish to create by holding down the mouse button, dragging the mouse pointer to the desired location and releasing the mouse. The control or controls will be dropped into your Component.

It may take a little practice to get used to where objects will be dropped but, once understood, it provides an easy way to set up your components.

Sizing and Moving Objects

A series of handles consisting of small black squares located at the center and corners of the control signify it as the currently selected object. You may click and drag these handles to resize an object. An object may be moved by clicking on it and dragging.

The up, down, left and right arrow keys may be used to move selected objects. When used with the Ctrl key, they can be used to resize objects. This works with single-selected and multi-selected objects. This provides a more accurate way to control the exact location and size of your objects.

The arrow key movement and sizing operations only works when the Visual Designer actually has the focus. If one of the other Studio panels (e.g. Code Editor, Object Properties) has the focus the arrow keys are processed by that panel and not by the designer. You must navigate to the Visual Designer before using the arrow keys.

See Also

Selecting Objects

Alignment Palette

Arrange Objects

Class Palette

Nudge Objects

Locking Objects

The Visual Designer

The Visual Designer Context Menu


Visual Designer Context Menu

Pressing the right mouse button in the Visual Designer will invoke its context menu. Depending on which object and how many objects are selected the following options will appear. In general, there are two types of context menus: one for single selected objects and one for multiple selected objects.

Switch to Editor

This causes the designer to switch to the Code Editor. The source code will display the object currently selected in the designer. This can also be accomplished by pressing the F7 key or by double clicking on the object.

Locate

This causes the Code Editor to position itself at the source code representing the selected object but it does not give the editor the focus. This option is useful if you are viewing the editor view and the designer view side-by-side.

This option is only available when a single object is selected.

Object Properties

This opens if the Object Properties panel, if it is not already open and gives it the focus. The properties for the currently selected object will be shown.

This option is only available when a single object is selected.

Drag Lock

This toggles the Drag Lock feature for the entire file.

Cut

This cuts all selected objects and moves them to the clipboard. This can also be accomplished by pressing the Ctrl-X key

Copy

This copies all selected objects to the clipboard. This can also be accomplished by pressing the Ctrl-C key

Paste

This pastes the contents of the clipboard into the Designer View. This can also be accomplished by pressing the Ctrl-V key

The paste will only occur of the pasted contents are properly formatted (i.e., they are objects). The objects will be pasted inside of the currently selected object.

This option is only available when a single object is selected.

Delete

This deletes all selected objects. This can also be accomplished by pressing the Del key

Center

This centers the selected object within its container. You will be prompted to center the object horizontally or vertically.

This option is only available when a single object is selected.

Arrange Objects

This option loads the Arrange Objects panel which can be used to size and locate groups of objects.

Class Help

This loads class reference help for the currently selected class (or if multiple objects are selected, the first selected object). This can also be accomplished by pressing the F1 key.

Designer Help

This loads the Studio Help for the Visual Designer. This can also be accomplished by pressing the Ctrl+F1 key.

Add Component to Project

This option will attempt to add the current file to the current project. If the file/component is already part of this project, this option is disabled.

This option may not succeed. The Studio may determine that the component cannot be added to the project. If so an error will be displayed, explaining the problem.

ActiveX Properties

This invokes an ActiveX control’s property panel. This is different than Object Properties Panel and is unique for each ActiveX control.

This option is only available when an ActiveX object is selected.

Append Tab Page

This adds a new tab page to the selected tab dialog. The new page is added as the last tab page.

This option is only available when a single tab dialog object is selected.

Insert Tab Page

This inserts a new tab page into the selected tab dialog. The page is inserted before the current tab page.

This option is only available when a single tab dialog object is selected.

Delete Tab Page

This deletes the current tab page from the selected tab dialog.

This option is only available when a single tab dialog object is selected.

Background Resolution Grid

This allows you to show or not show the Background Resolution Grid.

This option is only available if you invoke the context menu from the designer view’s “client area” – the white outer area of the designer view.

Close

This closes the designer view.

This option is only available if you invoke the context menu from the designer view’s “client area” – the white outer area of the designer view.

Align

This option allows you to align multiple selected objects. You will be presented with a sub-menu option allowing you to align all objects to the left, top, right, bottom, top-to-bottom and left-to-right.

Objects are all aligned relative to the first object selected.

This option is only available if you have multiple selected objects.

Align within Container

This option allows you to align multiple relative to their container. You will be presented with a sub-menu option of two options:

  • top-to-bottom – objects are located top to bottom, equally spaced within the container.

  • left-to-right – objects are located left to right, equally spaced within the container.

The objects are arranged in the order that they are selected.

This option is only available if you have multiple selected objects.

Make Same

This option allows you to make multiple selected objects the same height, width of size (both size and width).

Objects are sized based on the size of the first object selected.

This option is only available if you have multiple selected objects.

See Also

The Visual Designer

Selecting Objects

Dragging, Dropping and Resizing Objects

Object Properties

Locking Objects

Arrange Objects

The Background Resolution Grid

The Code Editor


Locking Objects

The Mouse Drag lock feature prevents objects from accidentally being moved with the mouse or the keyboard. When enabled you may still move objects via the Nudge Objects panel. A component's drag lock status is indicated in the Studio's Statusbar.

Mouse Drag Lock is toggled for the current component by selecting the Visual Designer’s context menu option “Drag Lock”, by pressing the Ctrl/L key or by clicking the drag lock symbol in the Statusbar.

If you set the drag lock status for a component it will be remembered the next time you open that component in the Studio.

See Also

Status Bar

Dragging, Dropping and Resizing Objects

The Visual Designer

The Visual Designer Context Menu


Background Resolution Grid

The Background Resolution Grid

It is often the case that the software developer is using a screen with much higher resolution than the target user will have. This means that you will need some kind of guide to ensure that the components you are building will not exceed the maximum space available on the user’s screen.

The Background Resolution Grid is a useful quick sizing aid for components. It gives you design references up to the full height and width of various screen resolutions.

The grid displays graphical guidelines drawn in the "client area" (the white space) of a component (e.g., View). The lines indicate the maximum size, in pixels, for various screen resolutions, including 640x480, 800x600, 1024x768, and 1280x1024, and are labeled.

You can activate the resolution grid by positioning the mouse in the "client area" (the white space) of a component and activating the Context-menu.

See Also

The Visual Designer

The Visual Designer Context Menu


Basic Concepts

There are some basic concepts behind working in the Visual DataFlex Studio that are important to understand as you develop applications. Please read the following sections carefully...

  • Workspaces and Libraries

  • Component Files

  • Parsing Source Code

  • Studio File Types


Workspaces and Libraries

The Visual DataFlex Studio operates within a workspace. A workspace defines the areas where your source files reside. The workspace is the area where you build your projects. Projects are built by assembling components into a single file. The components will use classes that are known to the workspace. These classes can be defined within the workspace, within libraries used by the workspace, and within the System Library.

Projects

A project is the code that you compile and run. A project consists of a file (usually an .src file) that uses other components (component files, class files, Data Dictionary files, etc.) to create an executable program. A project can be large (e.g. MyBigApplication.src) containing all of the components and classes within your workspace, or it can be small (e.g. MyTest.src) consisting of a few components that you wish to test.

You can create as few or as many projects within a workspace as you wish. Projects must be registered within a workspace. This is really just a simple process of adding a file to a list that Studio maintains. Projects can easily be added or removed from this list.

Current Project

The Studio is current project oriented. You are expected to select a current project and then work within this project. When you tell the Studio to compile, debug or run it will always operate on the current project. When the Studio provides you with code-sense (interface information) it provides it from the current project’s perspective.

Selecting a current project is a simple process.

Workspace Paths

The workspace paths are the logical directory areas used to define your workspace.

  • AppSrc – this contains Visual DataFlex source

  • AppHTML – this contains web application information

  • Bitmaps – this contains images used within your projects

  • DDSrc – this contains Data Dictionary source

  • Data – this contains your data and data-binding information

  • Help - this contains help files for your projects (if applicable)

  • IDESrc - this contains Studio configuration files for the workspace

  • Programs – this contains your compiled projects (programs)

AppSrc

This is the path that contains:

  • Custom Classes - classes used by the workspace

  • Components – objects used by projects (views, reports, etc.)

  • Projects – These the files you compile and run

  • Class “Config” definitions – A special directory that contains information about the classes available in your workspace

Subdirectory Paths

Any source path may contain subdirectory paths. This provides an effective and recommended mechanism for organizing your files.

All subdirectories defined within a source path are considered to be part of the workspace.

Files in these workspace subdirectories must be referenced relative to their location of a main source path. Most often that main source path will be your AppSrc directory.

For example, assume you have the file AccountsEntry.vw located in the following directory structure.

C:\Visual Dataflex Projects

Order Entry

AppSrc

AccountsPayable

Views

AccountsEntry.vw

Reports

AccountsReceivable

Views

Reports

DDSrc

This file is accessed relative to the main source path, AppSrc, and is therefore referenced as follows:

Use AccountsPayable\Views\AcountsEntry.vw

The file will be located relative to your main source paths. In the above example, it will find the file under the AppSrc path (“C:\Visual Dataflex Projects\Order Entry\AppSrc\” + “AccountsPayable\Views\AcountsEntry.vw”).

Note that your use statement must include the entire relative path. The following statement would not find the same file:

Use AccountsEntry.vw // this will not find the same file

In the above example, the file would have to be located directly under a main source path (e.g. …\Appsrc\AccountsEntry.vw).

Subdirectories will be used most often under the AppSrc path. However, subdirectories may be located under and of the main workspace source paths (e.g. AppSrc, DDSrc) and all library source paths. All paths will be searched until the file is found. The path defined as AppSrc is always searched first.

Primary AppSrc Path

The AppSrc path definition may consist of multiple paths. The first path, referred to as the Primary AppSrc Path, is the most important path.

Most often, you will only have a single AppSrc path. Additional paths can be defined more effectively as Libraries or as sub-directories within an AppSrc path.

Config directory (AppSrc\config)

The config directory must be located under the primary AppSrc path and must be named “config”. It contains information about your workspace’s class configuration. This includes:

  • The Class List - A class list is maintained that contains a list of all classes that should be displayed in the Workspace’s class palette

  • Object Preference Files – When an object is created by dragging and dropping a class from your class palette, a template file is read to determine what kind of custom code should be added to this object. This optional template file name consists of the class name with an extension “.DFO” and must reside in the config directory (e.g. appsrc\config\cMyButton.dfo).

  • Component Template File – When a new component is created, a template is used to create the new file.

Library Class Files

A Library is a group of classes (files) that are defined in a way that they can be used by multiple workspaces. A Workspace may include any number of libraries. By “include” we really mean, “point to”. When a library is added to a workspace, the library files paths are added to the workspace’s makepath.

Libraries are themselves just a workspace. Libraries are created and maintained within that library’s workspace. Although libraries are complete workspaces, only their classes are used within other workspaces.

A library has its own AppSrc\config folder and will containing all of the required configuration information such as a class list and object preference files.

A library may contain other libraries. When a library defines classes it will define those classes based on the super-classes that are already defined. Those will be classes defined in the library, classes defined in a library being used by the library, of classes defined in the System Class Library.

System Class Library

The system class library consists of the packages and classes installed as part of a Standard Visual DataFlex installation. The files in the System Class Library are read-only and should never be changed by the developer.

All workspaces and all libraries always have access to the System Class library. They do not need to be explicitly added as a library.

The Workspace Makepath

When a project is compiled a makepath is assembled. This makepath consists of a list of all paths required by the compiler to find the files needed to perform the compilation. This makepath is assembled dynamically by the compiler as follows:

  1. All AppSrc paths in the Workspace

  2. All AppSrc paths of all libraries used by the workspace

  3. Other workspace paths - DDSrc, Bitmaps, etc.

  4. The System Makepath – System Class Library (Pkg), Lib, etc.

The workspace paths are defined by the developer when they create or modify the workspace. The library paths are determined by which libraries a developer included in a workspace and by the workspace structure of those libraries. The System Makepath is system maintained and should never be changed by the developer.

Selecting A Workspace

A workspace is defined by an .SWS file that will be found in the root directory of a workspace (e.g. projects\order entry\order entry.sws). You may open a workspace by finding this file and double clicking on it. When you do this a new instance of the Studio will be loaded for that workspace. You may also select a workspace from within the Studio by either selecting a workspace from a most recently used list, or by navigating to a new .SWS file and selecting it. New workspaces may be created by selecting a “New Workspace” option.

Multiple instances of the Studio may be run as long as the each instance of the Studio is working in a different workspace.

Maintaining Classes in a Workspace Class List

Each Workspace maintains its own class list. This class list is displayed by the class palette. The classes in this list consist of classes defined within the workspace, classes defined within libraries and classes defined in the system class list.

The class list in any workspace contains a list of all of these classes. This list can be customized at the workspace level. This is all handled by selecting context menu options from the class palette. The following customizations are allowed:

  1. New classes may be added

  2. Classes may be removed

  3. Classes may be moved anywhere in the list

  4. New groups may be created to organize the classes

  5. Copies of class entries may be created

  6. All System classes can be hidden

When a library is added or removed from a workspace, the class list will be refreshed with this change. Once the change is made, you can reorganize the list any way you like. If a library changes (classes are added or removed from the library class list), a workspace using that class will get refreshed with that changes the next time that workspace is entered. Therefore, changes in libraries are always reflected in all workspaces using the library. The same rules apply to the system classes. Anytime the system classes change (i.e., a revision update) those changes will be reflected in the workspaces.

Adding Classes to a Class List

An existing class can be added to the class palette by loading the file containing the class and selecting Add Class to Palette from the class palette context menu. The class will get added with all of the required information.

New classes can be created and added to the class palette by selecting various options in the Create New Dialog’s Class tab page.

You do not need to add a class to the class list to be able to use it. Any class that can be modeled by the Studio will be modeled by the Studio. Adding a class to the class list simply adds it to the class palette, allowing you drag and drop the class into a designer view.

Adding Libraries to a Workspace

Libraries are added and removed from a workspace by selecting the Add/Remove Libraries context menu option from the class palette. When you add a library you will select the library by selecting the library’s workspace. You do this by finding and selection the Library’s .SWS file.

When you add a library, the Studio will allow you to add the library path as a relative or absolute path. Whenever possible, you should select the relative path option. The Studio will determine how to this path should be defined.

Organizing your Workspace and Libraries

It should be your goal to organize your workspaces and libraries in a way that offers maximum ease of use, flexibility and portability. This is best accomplished by:

  1. Use relative paths for all of your paths

  2. Arrange your workspaces and libraries so that they have a common root. This makes it easy to support relative paths, makes it easy to check in and check out entire source areas, and makes it easy to copy development areas to other computers.

  3. Use sub-directories under to AppSrc path to organize your files

  4. Avoid the use non-primary AppSrc paths – use Libraries (2) and sub-directories (3) instead.

  5. Do not change the system make path. If you want to add system-wide directories, use libraries

Below are two different examples of workspace / library paths that would work well. This first sample simply places all workspaces and libraries under the same path:

Projects

MainLibrary

ComLibrary

TestLibrary

Order Entry

Job Costing

Test Workspace

This sample places libraries and workspaces in separate branches, still under the same root

Projects

Libraries

MainLibrary

ComLibrary

TestLibrary

Workspaces

Order Entry

Job Costing

Test Workspace

See Also

Studio Workspace Configuration Files

Library Workspaces

Basic Concepts


Workspace Configuration Files

Studio Workspace Configuration Files

The Studio Workspace (.sws) file is automatically created for a new workspace in the root directory of your workspace. The file is an INI type of file and contains:

  • Version Information

  • Workspace Paths

  • Project Names

  • Libraries used in the workspace

  • Subclass names and packages for standard classes

A typical .sws file can look like:

[Properties]

Version=12.0

[WorkspacePaths]

ConfigFile=.\Programs\Config.ws

[Libraries]

Lib1=..\Example Library\Example Library.sws

[Projects]

Project0=ComSamples.src

Project1=DataDefinition.src

Project2=EmbSQLSample.src

Project3=InetTransfers.src

Project4=MAPI.src

Project5=Organization.src

Project6=RichEditApp.src

Project7=XML-Sample.src

Project8=Chapter3.src

Project9=ComposeMessage.Src

Project10=SP_Help.src

Version Information

The version information tag in the .sws file is a future feature setting. The functionality that will be attached to this setting has not been implemented.

Workspace Paths

The workspace paths are stored in the Workspace (.ws) configuration file. The path to the .ws file for the workspace in stored in the .sws file.

Project Names

Each individual executable that you develop within a workspace is called a project. A workspace therefore can have one or more projects. All known projects are stored in the .sws file and loaded inside the studio so that you can select the current project.

Libraries

A Library is a group of classes (files) that are defined in a way that they can be used by multiple workspaces. The .sws file stores the relative path to the .sws file(s) for all libraries used.

Subclass Names

If you create a subclass based on one of the standard classes used in the Studio when creating controls and you want your subclass to be used instead of the base class you can specify this as your preference. When you alter the class preference list you add entries to this section of the .sws file.


Library Workspaces

Libraries

We now encourage use of Libraries for sharing code among multiple workspaces. This is much more flexible and easier to use...

  • Multiple libraries can be added/removed on a workspace level

  • Libraries are easier to transport between multiple computers (due to being able to use relative paths)

  • Libraries are much easier to migrate between revisions (read: requires no special migration and/or configuration as all the configuration is on the workspace level)

  • Enables use of multiple library revisions in different workspaces (i.e. workspace A may use VDFQuery 2.3, workspace B may use VDFQuery 2.4 etc.).

In short, in order to share source/classes/class palette entries etc. we no longer encourage you to change the system make path or modify the workspace AppSrcPath.

Using libraries is essentially the same as adding additional workspace level paths. You get the same end result, sharing source between multiple workspaces, but it's easier to use, easier to migrate, and more flexible.

System Settings

We have replaced the use of the term "global" (as in "global classes") with the term "system" (as in "system make path" and "system classes").

When we refer to "system" we simply refer to the DAC system entries/configuration, and we strongly discourage any modifications of system classes, packages, paths, and other system configurations. We instead encourage modifications of workspace entries/configuration and/or paths. This allows for easier migration between revisions, e.g. no migration of the Global Subclass layer, and no need to worry about any changes made in our systen packages and/or directories or registry settings. It also makes it much easier to just take a directory structure consisting of one or more workspaces, zip it up and unzip it on another machine and just start using it, without having to worry about any special system/machine level configurations etc. i.e. greater flexibility and easier to use.


Component Files

Component files are used to divide a project into functional units. Different component categories represent specific types of functionality.

For example: an Order Entry Windows application would contain components for performing the following operations:

  • Customer Data Entry

  • Stock Available Report

  • Order Entry

  • Printing Orders

  • Customer Listing, etc.

Component Types

The Visual DataFlex Studio provides special support for the following component categories:

For Windows Applications

View Components

View components are data entry forms that bind data entry controls to a data dictionary structure. View components are used to perform some particular type of database task such as customer maintenance.

New views are created by selecting the View / Report tab page in the Create New Dialog.

Report Components

Report components query data from a data dictionary structure. Report components are used to produce a formatted query such as a customer listing, or a sales performance listing.

New reports are created by selecting the View / Report tab page in the Create New Dialog.

Database Dialog Components

Database dialogs are modal forms that bind data entry controls to a data dictionary structure. Database dialogs can be used for the same purpose as view components, however they are normally used to build lookup lists of data.

For example, a lookup that displays rows of data from a customer table can be used to browse and select a single row for editing in a view component.

View components and database dialog components are usually used together to produce view components that allow users to select rows to be edited from lookups (database dialogs).

Dialog Components

Dialog components are modal forms that do not bind to the project's data dictionaries. Dialog components are used to present information to the user (such as an "About" dialog).

Business Process Components

Business process components bind a data dictionary structure to some batch operation on one or more rows of data.

For example, an end of month process that archives sales data.

Data Dictionary Components

Data dictionary components are subclass declarations of the DataDictionary system class. Each subclass will define the business rules for a given table in the project's database.

Data dictionary classes are used by other components to construct data dictionary object structures (DDOs). These are used to bind data to the particular component and ensure that the data is presented and operated on according to each data dictionary's business rules.

Data dictionaries are defined using the Database Builder tool.

See Also: DDO Explorer

For Web Applications

Web Service Object Components (WSO)

Web service objects define an interface of methods that are published as web services. A web service object's interface may or may not be bound to a data dictionary structure.

See Also: Publishing Web Services, Web Application Development

Web Browser Object Components (WBO)

Web browser objects define an interface of published methods to communicate between WebCom objects and a data dictionary structure. This interface allows you to retrieve or send data from your ASP page.

See also: Publishing Web Object Interfaces, Web Application Development

Data Dictionary Components

See above.

Classifying Components

The Studio analyzes each file used in a project to determine if it belongs to one of the above component types.

A file will be classified as a component file if it contains an outer level object whose superclass is classified under one of the component types. i.e. the object classified as a component object is not nested inside any other object in that file.

If a file contains two outer level objects that have different classifications then the first classified object determines the file's component type.

Classes are associated with a component type using the ComponentType meta-data tag. A class's component type association is inherited by subclasses.

For more information see Studio Meta-Data.

Components in Workspace Explorer

Workspace Explorer displays the composition of component files used by the current project. Workspace Explorer's interface supports opening, adding and removing the listed component files.

Adding and removing component files is a special operation supported for View and Report components in Windows applications or WSO and WBO components in Web Applications.

Testing Components

Since component files are functional units it would be convenient to be able to test a component in isolation, i.e. separate from the rest of the project. For Windows applications the Studio supports this via the concept of "Test Projects".

A test project is a cut down Windows application project intended to be used for testing one or more component files in isolation from the project they belong to.

Create a test project by selecting "Test Windows Project" from the Create New dialog.

To use the test project, make it the current project in Workspace Explorer, then add the component you want to test to the test project (you can use the Add Component context menu option in the Code Editor or Visual Designer). Now click the run button to run the test project and begin testing and debugging your component.

Some tips for using test projects:

  • Once you create a test project you can modify it as required. This may be necessary for example to simulate certain operations in your main project such as user login etc.

  • You can add special debugging code to test projects.

  • You may create as many test projects as you want in each workspace. If you have a component that is tested frequently you can take advantage of this to build a dedicated test project for that component.

  • Test projects may contain as many components as you like. If you are reusing a test project for several components then you may want to remove old components from the project.

See Also

File Types

Create New

Basic Concepts


Parsing Source Code

Autonomous Files

Any source file can be considered to be autonomous or non-autonomous.

An autonomous file is a file where all of its class dependencies (required super classes and mixins) are satisfied by the file or by one of the files it uses. From a development point of view, an autonomous file is the most flexible type of file. You can drop this file into any project or use it within any other file and you are sure that all of the files required to allow this file to compile have been brought along. From the Studio's point of view, an autonomous file allows it to most fully understand and therefore most fully model the classes and objects within the file. All of the objects, classes, super classes, mixins and their interfaces are all known to the Studio.

A non-autonomous file is a file where not all of the class dependencies are satisfied by the file or the files it uses. A non-autonomous file cannot be compiled stand-alone. However, when used within a project, a non-autonomous file can be properly compiled. This occurs because the files and classes that the non-autonomous files are dependent upon are provided by the other files used within the project. The Studio cannot fully model a non-autonomous file when it is considered as a stand alone file. Classes and interfaces may exist in other files and the Studio has no way of knowing where those classes are.

What is needed is some way to tell the Studio that a non-autonomous file is part of a larger project. The Studio would then have the information needed to understand and model the file. The Studio provides this capability in a straight forward manner. If your non autonomous file is a member of the current project (i.e., it will get used and compiled when the current project is compiled), the Studio will use all of the files available in the current project to help satisfy any missing dependencies. You might think of this as a shortcut. If the file is available to the current project, it is also available to a non-autonomous file, if that the file is a member of the current project.

Modeling Files

The Studio applies the following rules when attempting to model a file. By "model" we refer to the actions taken by the Studio's designer-view, property panel view and DDO Explorer view.

  1. If a file is autonomous - it can be modeled. This is the ideal.

  2. If a file is non-autonomous and part of the current project - it can be modeled.

  3. If a file is non-autonomous and not part of the current project - it cannot be modeled.

While it is obviously best to always create autonomous files, it is not required. If you develop from the mind-set of always working on a current project and you make sure that the files you are modeling are part of that project, then #1 and #2 above provide essentially the same modeling capabilities. The only modeling drawback with non-autonomous files is that you cannot model them outside of the context of their current project.

It is possible that a non-autonomous file that is part of a project (#2 above) could still have missing classes. When that happens, this is an error - the project will not compile. The Studio will allow file modeling. The modeling may not be accurate because the data provided to the Studio about the classes is not complete. When this occurs, you will want to fix the error.

Even if a file cannot be modeled by the Designer View, DDO Explorer View, or the Properties Panel, it can be used within the Studio by the Code Editor and Code Explorer views. Code-sense in the editor is also available for these files. The code-sense may not be as thorough because super classes, mixin classes and their interfaces may not be available.

When working with non-autonomous files, it is also best to work within the current project they belong to.

Foreign Files

A file may not even be part of the current workspace. This occurs if a file is not found within the workspace's source path (appsrc, ddsrc, etc.) directories or sub-directories. These are referred to as foreign files. If a file is foreign, it cannot be modeled. Even code-sense will not be available as it would be providing information from the wrong workspace. The Code Editor and Code Explorer Views can still be used.

Files With Structural Errors

There is another type of error which will prevent modeling of files. If a file is not structured properly, Designer, DDO and Property modeling are disabled until the file is corrected. An example of a structural error would be a class nested within a class, a class without an end_class or an object without an end_object. When these types of errors occur the entire structure of a file is suspect. A single extra object command or a missing end_object command can completely alter the structure of your objects. Attempting to model these would only result in misleading information (i.e., things might look right but be very wrong). These kinds of errors must be corrected within the code-editor.

Making Autonomous Files

Because autonomous files are more flexible, it is desirable to make autonomous files whenever possible. It is also desirable to convert old non-autonomous files into autonomous files. This is done by identifying the missing classes and providing the required "use" statements where those missing classes are defined. The Studio makes this easy to do.

A file can only be autonomous if all of the files it uses are also autonomous. Therefore, before you can make any file autonomous you must first make sure that all the files it uses are autonomous. The Studio provides the facility to check if a file is autonomous. The option "Show All External Dependencies" can be selected from any editor or designer view. This will provide a list of all missing classes (super classes and mixins) for the selected file and for all of the files used by the file. The report will be generated to the output panel where you can double-click on any line and be taken to the line in the editor where the missing class is referenced. If you perform this operation on your project file (e.g. order.src) you will get a report of all non-autonomous files in the project.

Remember that non-autonomous files are not errors. They are only errors if the classes referenced are never defined anywhere within a project.

Parsing Conditional Source Code

The Studio Parser can be configured with respect to how it should treat #IFDEF source code blocks. By default the Studio parses all code on both sides of the #IFDEF, and it can be configured to parse only the true block or the false block. In most cases the default configuration will be adequate. It means that the Studio will parse and collect information about boths sides of the specified #IFDEF block, which gives the Studio more information about your workspace.

However, in some cases, parsing both sides of the #IFDEF block, can cause conflicting information which may lead to metadata errors. For example, both sides might define a class with the same name, which would confuse the Studio. In that case you can configure the workspace to treat the specified symbol as evaluating to true/false, which will instruct the Studio to parse only one side of the #IFDEF block. In most cases, #IFDEF blocks causes no metadata conflicts, and the Studio can safely parse both sides, simply collecting as much information as possible.

To configure how the workspace should treat specific #IFDEF symbols, open the Configure Workspace Properties dialog, accessed from the Tools menu, and select the Conditionals tab. You can specify each #IFDEF symbol, e.g. USE$VPE, and whether the Studio should parse the true/false block.

The Studio also has a built-in #IFDEF rule, IS$WINDOWS, which evaluates to true and causes the Studio to parse the true block and ignore the false block.

See Also

Basic Concepts


Studio File Types

Studio File Extensions

The Studio can model various types of text files. Below is a list of each file type and how it is interpreted in the Studio:

  • Visual DataFlex Source Code

  • Web Content: These files contain markup such as HTML designed to be displayed in browser applications. The Studio editor supports color highlighting of HTML files.

  • JavaScript: The Studio editor supports color highlighting of JavaScript.

  • XML: The Studio editor supports color highlighting of XML.

  • Config File: Files that are formatted as windows INI files. The Studio editor supports color highlighting of INI files.

  • SQL: The Studio editor supports color highlighting of SQL.

  • OEM Text: These are files where any ASCII characters with ordinal value > 127 is stored in OEM (Original Equipment Manufacturer) format.

  • Plain Text: All other files are considered to be ANSI format plain text files.

File Extensions

A file's type is determined by the filename's extension as the file is opened. Below is a list of each file type and the file extensions the Studio will use to recognize files of each type:

File Type | Extensions
Visual DataFlex Source Code | *.src *.pkg *.vw *.dg *.sl *.bp *.wo *.rv *.dd *.fd *.inc *.tpl *.mn
Web Content | *.htm *.html *.asp *.jsp *.wml *.aspx *.css *.asa
JavaScript | *.js
XML | *.xml
Config File | *.ini *.dsk *.ws *.sws *.cfg
SQL | *.sql
OEM Text | *.dfo *.prn
Plain Text | All other file extensions.

User defined file extensions for Visual DataFlex source files can be registered in the Configure Studio dialog.

See Also

Basic Concepts


Debugging

The Studio is automatically put into Debug mode when running the current project, by selecting Run from the Debug menu, or pressing F5.

When the Studio is in Debug mode, your program is either running (executing), or in break mode. All debug windows are available when the Studio is in any of these debug modes, and accessible from the Debug menu. But most debugging functionality, such as viewing the current value of variables, is disabled when the program is running.

Setting and Executing Breakpoints

The most common approach to debugging will be to:

  • Set breakpoints inside a procedure or function

  • Execute your program until the breakpoint is encountered

  • Step through the program inspecting the values of local variables during each step.

You set breakpoints directly in the Code Editor by finding the source code location where to place the breakpoint, and clicking in the left margin of the editor. You can also right-click and select Breakpoint Set/Remove, or press F9. The Breakpoints Panel also lets you manage existing breakpoints.

When a breakpoint is encountered, the Visual DataFlex program is paused and the current instruction source module and line is displayed. You are now in debug break mode - the Studio controls the execution of the program. This is where the debugging process really begins.

Inspecting your Program and Stepping through your Source

Once the program is paused, you can inspect the state of your program. You can for example:

  • View/modify the values of local and global variables.

  • Evaluate expressions using the Watches Window, to inspect object property values, and other expressions.

  • View the message call stack, and select different call stack frames to view the current instruction and source code for each active method call.

  • Inspect table information, and much more.

At all times you can view source code from any module within your program.

While in debug mode, you have several options available for controlling program execution. You can:

  • Single step through your program instruction by instruction.

  • When a procedure or function call is encountered you can choose to step into or over the method call.

  • You can also choose to step out of the current procedure/function.

During this stepping process you will continue to inspect the state of your local variables and other data. The heart of debugging is controlling execution and stepping through a program while local variables and other values are inspected.

For more information on this topic, please refer to Execution Control.

Debugging Web Applications and Web Services

You can debug Web applications/Web Services as well as Windows applications in the Studio. When debugging a web application, the Studio runs the program and also launches a web browser window so you can control the web application program being debugged.

When debugging web applications, you can place breakpoints and inspect variables etc. as usual in your Visual DataFlex program and source code. To debug ASP code and/or client side scripting, refer to Debugging Your Web Applications.


Breakpoints

When the program is running and a breakpoint is encountered, the program enters break mode. When the program is in break mode, all debug windows are updated with current information, and enabled. Setting and executing breakpoints is perhaps the single most important step in debugging a program.

The Studio allows you to easily set multiple breakpoints, to disable and enable all or any breakpoint and to view the source where each breakpoint is set.

Setting/Removing Breakpoints

You set breakpoints directly in the Code Editor by finding the source location to place the breakpoint and clicking in the left margin of the editor. You can also right-click and select Breakpoint Set/Remove, or press F9. The Breakpoints window also lets you manage existing breakpoints, and to remove all breakpoints at the same time for example.

Enabling/Disabling Breakpoints

Breakpoints can be enabled and disabled. The difference between removing and disabling a breakpoint is that a disabled breakpoint can be easily re-enabled. Disabled breakpoints are also still listed in the Breakpoints window.

You can enable/disable individual breakpoints directly in the Code Editor by finding the source line with the breakpoint, right-click and select Breakpoint Enable/Disable, or press Ctrl+F9.

You can also enable/disable all breakpoints at the same time, using the Breakpoints window.

Of Special Note

Setting Breakpoints on If and Else Commands

Placing a breakpoint on an If statement works as expected. The break will occur before the if statement is executed.

Placing a breakpoint on an else command will probably not work as expected. The method the DataFlex compiler uses for creating else statements is confusing when used with a debugger. Internally the else command will not get executed if the else condition is true but it will get executed if the condition is false (at which point it skips the else block). While this works perfectly, it is somewhat debugger unfriendly.

If you wish to break on an else statement you will need to break on the first line of code within the else block. For example,

If SomeCondition Begin

...

End

Else Begin // Do not place Break here!

Send DoSomething // Place Break Here

...

End

If your Else command executes a single command and does not use a begin/end block, you will have to place the breakpoint on the If statement and then single step into the else code.

Setting Breakpoints on Procedures and Functions

Very often you will wish to place a breakpoint at the start of a function or a procedure. To do this you must place your breakpoint on the first executable line within the function and procedure and not on the source line that contains the function or procedure statement. For example,

Procedure DoSomething Integer iVal // Do not place Break here!

Integer iCount // Place Break Here

Visual DataFlex function and procedure statements are executed when the program is being initialized and not when the actual procedure or function is called. When the function or procedure is called, execution is passed to the first line in the method.

See Also

Debugging


Execution Control

When the Studio is in debug mode, your program is either running (executing), or in break mode. All debug windows are available when the Studio is in any of these debug modes, and accessible from the Debug menu. But most debug functionality, such as viewing the current value of variables, is disabled when the program is running. And most debug windows will not reflect up to date information until the program is in break mode.

Start Debugging

To start debugging your program, from the Debug menu, select Run, or press F5. This will automatically compile the program only if changes are detected, and start debugging. If no changes are detected, it will start debugging immediately.

You can also select Run (Without Compile) from the Debug menu, to start debugging without first compiling the program even if changes are detected.

Initially when the program is started and the Studio goes into debug mode, the program runs (executes) until a breakpoint is encountered, or the program is manually paused from the Studio.

Stop Debugging

To stop debugging your program, from the Debug menu select Stop, or press Shift+F5. When the debugging is stopped, the Studio will automatically leave debug mode. This should not be confused with Pause. Stop Debugging ends the debug session and closes the program.

The debug session also ends automatically when the program exits. So closing the program being debugged, will also stop debugging and the Studio will automatically leave debug mode.

Stepping Through a Program

The step functionality is available when the program is in break mode. The program enters break mode when a breakpoint is encountered or the program is manually paused from the Studio.

Step Into

Step Into executes the current line, but if the current line contains a method call, execution will be transferred to the called method. The method call is stepped into, and execution breaks at the first line in the called method.

From the Debug menu or toolbar, select Step Into, or press F11.

Step Over

Step Over executes the current line, just like Step Into, except if the current line contains a methods call, in which case it doesn't break at the first when the called method is entered. The method call is stepped over, and execution breaks at the next line.

If the current line contains no method call, the Step Into and Step Over functions behave the same. If a breakpoint is encountered before the next line, execution breaks at that location.

From the Debug menu or toolbar, select Step Over, or press F10.

Step Out

Step Out resumes execution until the current method returns to the calling method. Execution will break at the return point of the calling method. Stepping out of the current method call.

From the Debug menu or toolbar, select Step Out, or press F12.

Run To Cursor

Run to cursor resumes execution until the line where the cursor is located is reached. Typically this is used within a function or procedure to quickly move program execution to a line further down within the method.

Move the cursor to the line you wish to run to, from the Debug menu or toolbar, select Run To Cursor, or press Shift+F10.

Continue

Continue leaves break mode and resumes execution until a breakpoint is encountered, or the program is manually paused.

From the Debug menu or toolbar, select Continue, or press F5.

Pause

Pause lets you manually pause the program and enter break mode without a specific breakpoint. Execution will break immediately, and the program enters break mode. After which you can step through the program and the various debug windows are updated.

From the Debug menu or toolbar, select Pause.

Limited Break Mode

When the program is manually paused by selecting Pause from the Debug menu or toolbar, and if the program cannot be paused for some reason, the program enters limited break mode.

When the program is in limited break mode, the Studio operates just like in break mode. Most debug functionality and windows are enabled, except for the Database Tables Window, and some specific expressions in the Watches Window and Variables Windows that requires program intervention.

See Also

Debugging


Viewing and Modifying Variables

Global Variables Window

The Global Variables window is accessed from the Debug Menu by selecting Windows and choosing Globals, or from the Debug toolbar. It displays all global variables in the program, and lets you modify their values.

The Global Variables Window is only enabled and up to date when the program is in break mode. As you step through the program, the window is automatically updated to reflect changes.

Local Variables Window

The Local Variables window is accessed from the Debug menu by selecting Windows and choosing Locals, or from the Debug toolbar. It displays all local variables of the selected method context, and lets you modify their values.

The method context is defined by the selected call stack entry in the Call Stack Window. Activating a different call stack entry in the Call Stack window also updates the Local Variables Window with the variables of the selected method context.

The Local Variables Window is only enabled and up to date when the program is in break mode. As you step through the program, the window is automatically updated to reflect changes.

Viewing Variables in the Code Editor

Local and global variable values can be quickly viewed by hovering the mouse cursor over the variable name in the procedure or function that defines it. If the variable is in scope and the program is in break mode, its value will be displayed in a tool tip window.

Modifying Variables

You can modify the value of variables when the program is in break mode. To modify the value of a variable, select the variable in the Local/Global Variables Window, and then click in the corresponding Value column, type the new value and press Enter.

You can modify the value of most variable types, except for RowID and Variant variables. Variables of String type can be fully modified, including its size, when in normal break mode. While in limited break mode, only the individual characters of String variables can be modified.

Variables, but no other types of expressions, may also be modified in the Watches window.

Struct and Array Variables

Struct and Array variables are displayed in a hierarchical fashion in the Local/Global Variables Window. You can expand/collapse the struct members and the array elements.

String Values Displayed in Quotes

Variables containing string values are displayed within quotes to make it easier to see leading/trailing whitespace characters. When editing/modifying string variables, the quotes are not displayed and do not need to be specified.

See Also

Debugging


Evaluating Expressions and Using the Watches Window

The Watches window lets you view anything from simple variables to complex expressions. The Watches window is often used as a complement to the Local/Global Variables windows. You can add variables/expressions that you wish to track over the course of the debugging session, or that you wish to find quickly without having to sort through a bigger list in the Local/Global Variables windows.

The Watches window is accessed from the Debug menu by selecting Windows and choosing Watches.

Adding Variables/Expressions to the Watches Window

You can add a variable/expression to the watches window by clicking in the Name column of the last empty row, which will open it up for editing, and then type in the name of the variable or the expression and press Enter.

You can also use drag and drop to add watches. Select the desired text from the Code Editor, and drag the text using the mouse to the Watches window and drop it. The selected text will be added to the end of the list of watches.

Watches can also be added from the Local/Global Variables Window as well as the Database Tables Window. Select the specified variable/table column, right-click and select Add to Watches.

Removing Watches

To remove a watch, select the item and press Delete.

You can also remove all watches at the same time, right-click in the Watches Window and select Remove All.

Expressions that Require Program Intervention

Most expressions are evaluated in the debugger, and are available at any time in break mode. But expressions that invoke methods or access object properties, require program intervention and are evaluated in the context of the program. Expressions that require program intervention are not available in limited break mode.

Side Effects of Expressions Evaluated in the Context of the Program

When evaluating expressions that invoke methods or access object properties, side effects can occur. Because the mere evaluation of such expressions may execute code in your program, which can modify variables and the state of your program. Such side effects can make debugging difficult by creating the appearance of bugs or masking real bugs.

Expressions that do not call methods (functions/procedures) cannot cause side effects, because they’re evaluated in the debugger without executing code in the program. Accessing object properties cannot not cause side effects unless the property access method has been explicitly augmented in program code.

Struct and Array Values

Struct and Array values are displayed in a hierarchical fashion in the Watches Window. You can expand/collapse the struct members and the array elements.

String Values Displayed in Quotes

String values are displayed within quotes to make it easier to see leading/trailing whitespace characters. When editing/modifying string variables, the quotes are not displayed and do not need to be specified.

Modifying Variables

You can modify the value of variables when the program is in break mode. To modify the value of a variable, select the variable in the Watches Window, and then click in the corresponding Value column, type the new value and press Enter.

You can modify the value of most variable types, except for RowID and Variant variables. Variables of String type can be fully modified, including its size, when in normal break mode. While in limited break mode, only the individual characters of String variables can be modified.

Examples of Evaluating Expressions

Local/Global Variables

sMyVariable

Struct Members and Array Elements

myArray[2]

myUsAddress.sCity

Object Properties and Functions

Name(Self)

Value(Self,0)

Field_Current_Value(hDD,iField)

These examples assume that the variables hDD and iField are defined and in-scope.

Complex Expressions

An expression may contain any valid combination of variables, functions, properties and object functions. Some examples are:

Right(sMyVariable,5)

"Id=" * String(hDD) * Object_Label(hDD)

See Also

Debugging


Using the Call Stack Window

The Call Stack window displays the nested method calls currently on the stack. You can access the Call Stack Window from the Debug menu by selecting Windows and choosing Call Stack.

Whenever a method is called an entry is added to the call stack. When this method calls another method another entry is added to stack. When a method is completed, its entry is removed from the call stack. The current method is always displayed at the top of the call stack, and the method from where it was called is displayed directly below.

The Call Stack Window is only enabled and up to date when the program is in break mode. As you step through the program, the window is automatically updated to reflect changes.

Message Delegation and Runtime Class Methods

Calling a method can be referred to as “sending a message”. If an object cannot resolve a message, it can choose to delegate to its parent object. When a message is delegated it’s also displayed in the call stack, so that you can inspect how a message was delegated. This is handled by the runtime, and although you can see the entry on the call stack there’s no corresponding source code available.

Methods implemented in runtime classes cannot be stepped into, and there’s no corresponding source code, but they may of course in turn call other methods. So methods implemented in the runtime are also displayed in the call stack so that you can inspect how nested calls were invoked.

The above conditions are not always apparent by viewing source code and single stepping through a program. However, when single stepping is used in conjunction with the call stack you will be able to see exactly what your program is doing.

Switching Call Stack Frame and Method Context

To switch to another call stack frame, click the specified entry in the Call Stack Window. Clicking a Call Stack entry takes you to the source code for the current line in that call stack frame, and the Local Variables Window is updated with the local variables for that method context.

By switching Call Stack frame you can easily follow the code and see how each method calls the next, and inspect local variables to each method call context. It quickly allows you to go back and forth in the Call Stack and inspect the various conditions of each call stack frame and the code that invoked the next call. This in combination with inspecting variables and stepping through code are probably the most important features of debugging.

See Also

Debugging


Using the Database Tables Window

Using the Tables Window

The Tables Window displays information about all open tables, and their corresponding columns. You can access the Tables window from the Debug menu by selecting Windows and choosing Tables.

The Tables Window is only enabled and up to date when the program is in normal break mode, it’s not enabled in limited break mode. As you step through the program, the window is automatically updated to reflect changes.

Of Special Note

Note that table column data represents the state of your data within the global buffer and not the state of your data within data dictionaries. When data is changed within your DDO the data change may not be reflected in the global buffers. Also remember that the current record may not be the same as the DDO’s current record. You are usually more interested in the state of your data inside of your data-dictionary objects.

Also remember that the table column data represents the state of the global buffer in the program you’re debugging, and not necessarily the state of the tables. Other users could have changed the data in the table.

See Also

Debugging


Using the Message Trace Window

Message tracing lets you create a history of method calls. You can access the Message Trace window from the Debug menu by selecting Windows and choosing Message Trace. Since messages are really procedure and function calls, a message trace can be thought of as a call stack history. Messages are displayed in a tree view hierarchy.

Message tracing is useful when you need to review an entire operation (e.g. the finding of a record), and get a quick overview of the methods involved.

To create a message history, execute your program and get it ready to start the process you wish to record. Now, turn on the message tracing, right-click in the Message Trace window and check Trace Messages from the context menu, then return to your application and run the process. When the process is complete, turn off the message trace by right-clicking in the Message Trace Window and uncheck Trace Message. You can now study the message trace history and try to determine what is happening in your program. During your review process of the message trace you can automatically display the appropriate source code for any message in the source window by double-clicking the message in the tree view.

While the message trace provides you with a history of a process it does not record the values of variables and properties. To do this you will need to set a breakpoint and step through your source. Often tracing will show you where you need to place your breakpoints.

Message Filters

Sometimes a message trace can be overwhelming with too much information, so you might want to filter out certain messages. You can access the Filter Options by right-clicking the Message Trace Window and selecting Filter Options from the context menu.

You can also select a specific message in the Message Trace Window, right-click and select Filter. This will automatically add the specified message to the filter.

A few specific messages are filtered by default, which typically occur very often are usually of little interest.

Note that filters do not apply to the Message Trace Window itself, they apply to methods as they’re called.

See Also

Debugging


Modified Project Source

The Modified Project Source dialog is activated after you edit the source code of a project that you are debugging. The dialog is only activated when you have edited the project and during a debug session and the debugger enters break mode.

This dialog warns you that the project's source code has been modified since the project was last compiled and the debug session was started. The warning is necessary because editing source code at this time can mean that the source code no longer matches the code being executed. For example, you may have deleted a procedure.

When the program being executed no longer matches the source code then stepping through the program's source code may not make sense in some cases. Specifically the Studio's indicator for the current line of code being executed may not line up with the real line of code being executed.

At this point you may not care about this synchronization problem, or you may assume that these source changes should not affect this source code synchronization.

The dialog presents three options:

Recompile Project and Restart

Choose this option to stop the current debugging session, recompile the project then restart the debugging session. This will ensure that the source code is once again synchronized with the compiled program.

Stop this Debugging Session

Choose this option to simply stop the current debugging session.

Continue Debugging

Choose this option to continue debugging despite the potential synchronization problems with the project's source code. When you choose this option then the Studio will not activate this dialog again if you make more changes to the source code during the current debugging session.

OK

Click the OK button to perform the selected operation.

See Also

Debugging


Workspace Migration

What is Workspace Migration?

The workspace migration process helps you bring your applications from a previous revision of Visual DataFlex into the latest Visual DataFlex revision. All settings from your current environment and specifically for your workspace should be converted to conform with the requirements of the new Visual DataFlex revision. This will allow the features you built in previous revisions to be used in the latest revision.

The workspace migration process involves examining the source code used in the workspace as well as the environment settings (like system make path, registry subclasses, subclass layers, registered components, class palette classes, etc.) and translating all that into something the new revision can understand.

Why is it necessary to migrate a Visual DataFlex application?

The Visual DataFlex development environment is improved and expanded from revision to revision. In order to have your application fully modeled and compiling in the latest Visual DataFlex environment, you will need to make adjustments to your workspace.

How can a workspace be migrated?

The necessary changes to the source code and the workspace configuration can be automatically preformed through the Workspace Migration Wizard that is part of Visual DataFlex.

In order to use "full" migration mode, you will need to have the Visual DataFlex host environment installed and the workspace to be migrated will need to be registered in that environment. This will guarantee that all your settings are brought forward to the new Visual DataFlex revision. If you do not have the host Visual DataFlex environment installed or the workspace is not registered in any other Visual DataFlex revision present on your machine, you can run the Workspace Migration Wizard in "limited" migration mode.

What is Full Migration Mode?

In full migration mode, the wizard has access to the host environment (i.e. the original Visual DataFlex Studio is installed on this machine and the selected workspace is registered in it) and it will be able to detect environment settings like global subclass layer, subclasses preferences, class palette classes, etc.

If you run in full migration mode, all your settings and files used by the workspace will be migrated.

What is Limited Migration Mode?

In limited migration mode, the wizard does not have access to the host environment and it will not be able to detect environment settings like global subclass layer, subclasses preferences, class palette classes, etc.

If you run the wizard in limited migration mode, just the workspace and the source code specified in the paths in its WS file will be examined and migrated.

How to start the migration process?

The Workspace Migration Wizard can be started by...

  • Selecting File | Open Workspace and then selecting the WS file of the workspace to be migrated

  • Double-clicking on the WS file of the workspace to be migrated

What does the Workspace Migration Wizard do with the workspace?

The Workspace Migration Wizard shows detailed information along each step of the migration process. See "What actually happens during migration." for a complete overview.

See Also

Workspace Migration Wizard

Summary of Workspace Changes

What actually happens during Migration

Code Modified by the Migration Wizard

Files no longer needed after Migration

Library Workspaces and Migration


Workspace Migration Wizard

The Workspace Migration Wizard is launched whenever a Workspace file (workspacename.ws) is opened and the Studio detects that the workspace is from an older revision of Visual DataFlex. It determines this by checking for a valid Studio Workspace file (workspacename.sws) in the Home folder of the workspace. If the Studio Workspace file exists, the Studio will generate an error and you should open the corresponding SWS file. If not, it will automatically launch this wizard.

The form on this page shows the selected Workspace file.

Next Step

Visual DataFlex Revision

See Also

Workspaces and Libraries

What actually happens during migration


Workspace Migration Visual DataFlex Revision

Workspaces often depend on source and configuration options "outside" the actual workspace. These are provided by the host revision of Visual DataFlex and include:

  • Classes (and associated source) you defined outside the workspace (on a global level). These classes may be part of a global subclass layer, or just individual classes.

  • Classes (and associated source) that a 3rd party provided, such as VDFQuery. These classes are specifically not defined as a global layer. They are often placed in a common area outside the workspace so that multiple workspaces can use them.

  • The placement of various classes (regardless of their location) on the controls palette of the host revision.

For all of these reasons, it can be important (often vital) that the host revision for the workspace be clearly identified to the Workspace Migration Wizard.

The wizard will examine the system and identify all prior revisions of Visual DataFlex (8 and higher) that are installed. It will then identify the host revisions where the selected workspace is registered – it does that by checking if the workspace (.ws) file is registered in Workspaces.ini in any of the installed revisions.

If the workspace being migrated is registered under multiple revisions, all those revisions will be listed in the combo. The most recent revision will be selected as the default host, but you can change it if the default is incorrect.

If no other revision of Visual DataFlex was detected or the workspace is not registered in any of the detected revisions, you will have the option to run in limited migration mode.

Next Step

Pre-Analysis

See Also

What actually happens during migration


Workspace Migration Pre-Analysis

During the pre-analysis phase of the migration, the System Make Path and the AppSrc path of the workspace to be migrated are analyzed to determine if the workspace uses a global subclass layer in the host revision and to detect any library candidates part of the workspace.

The wizard will use the information discovered during the pre-analysis to further guide the migration process and provide information on what was found. If you are running in limited migration mode, the migration wizard will detect only library candidates present in the workspace's AppSrcPath -- no attempt to detect a global subclass layer will be made.

Next Step

Global Subclass Layer

See Also

What actually happens during migration


Workspace Migration Global Subclass Layer

This page only displays if you are running in full migration mode and the migration wizard determined that you had a modified System Make Path and no global subclass layer was detected in the default location (<Visual DataFlex host revision>\usr\global\AppSrc).

If you have a global subclass layer located in a non-standard directory, here you have the chance to pick that directory. All the other additional non-standard directories in the System Make Path will be listed and you can select the one that is used to hold the source files of your global subclass layer.

If you do not have a global subclass layer, all the non-standard directories detected will be considered Library Candidates. You will have a chance to configure those on the Library Candidates page.

See the information about Workspaces and Libraries.

Of Special Note

The migration wizard assumes that all source code for a global subclass layer is located in the \usr\global\AppSrc folder of the host Visual DataFlex revision being migrated from. If any source code used in a global subclass layer is located elsewhere, it will not be found and properly migrated.

Next Step

Analysis

See Also

What actually happens during migration


Workspace Migration Analysis

During the analysis phase of the migration, all the source code in the primary AppSrcPath and DDSrcPath folders of the workspace are parsed.

If running in full migration mode, the System Make Path of the host revision, as well as all the classes in the palette of the host environment (defined in IdeClasses.dfc) are parsed.

The wizard will use the information discovered during the analysis to further guide the migration process and provide information on what was found.

Next Step

Analysis Results

See Also

What actually happens during migration


Workspace Migration Analysis Results

This wizard page shows the most important aspects of the migration analysis.

See Result Details

This option displays a dialog that lists several tab pages with information collected about the workspace being migrated during analysis.

See List of Ignored Files

This option shows a dialog that lists all of the files in the workspace that were not parsed during the analysis. This list is made up of files that should not contain source code (e.g. database files, debugger files, .exe files, zip files, etc.).

See Errors

If the analysis of the workspace and host environment uncovered any conditions that would interfere with a successful migration, those conditions will be listed here. Errors are fatal and the migration cannot continue until these errors are corrected. You can correct the condition and then run the migration again.

See Warnings

If the analysis of the workspace and host environment uncovered any conditions that impact the overall results of the migration, those conditions will be listed here.

You will find that these conditions may also be impacting the workspace in its current environment. An example of this is that the controls palette in the host environment contains an entry that has not been used recently and the referenced package file is missing. In a case like that, the controls palette entry will not be migrated.

Next Step

Result Details

See Also

What actually happens during migration


Workspace Migration Result Details

Workspace Source Files

This tab page lists all source files that were found to be used by the source code in the workspace's primary AppSrcPath folder, sorted alphabetically by location.

Projects

This tab page shows the list of all source files that will be registered as project files in the migrated workspace. A project file is any file that is located in the primary AppSrcPath folder of the workspace and contains a "Start_UI" (for Windows projects) or "Send StartWebApp" (for Web projects). The list is sorted alphabetically.

ActiveX

This tab page shows the list of all source files located in the primary AppSrcPath folder of the workspace that use ActiveX controls and have associated resource (.res) files, sorted alphabetically by file name.

WO Files

This tab page shows the list of .WO files in this workspace that contain published web methods, sorted alphabetically by file name.

FlexCOM2 Classes

This tab page shows the list of all FlexCOM2 classes used by the source code in the workspace's primary AppSrcPath folder, sorted alphabetically by file name.

Special Note

The following tab pages will only be populated when running in full migration mode.

DFCs

This tab page shows the list of all custom classes and their respective properties to be migrated, sorted alphabetically by class name. This list is determined from the list of non-standard classes that were registered on the host revision's Class Palette (defined in IdeClasses.dfc).

DFOs

This tab page shows the list of all .DFO files to be migrated that were parsed during the analysis, sorted alphabetically by file name. This list is determined from the list of non-standard classes that were registered on the host revision's Class Palette (defined in IdeClasses.dfc).

Class Palette

This tab page shows the list of all classes to be migrated to the new Class Palette that were parsed during the analysis, sorted alphabetically by category and class name. This list is determined from the list of non-standard classes that were registered on the host revision's Class Palette (defined in IdeClasses.dfc).

Registry Classes

This tab page shows the name of the non-standard classes that were found in the registry for the selected workspace or the Visual DataFlex host revision. The list is organized by class name.

Next Step

Global Library

See Also

What actually happens during migration


Workspace Migration Global Library

This page only displays if the migration wizard is running in full migration mode and it was determined that you had a standard global subclass layer in the host environment, or you chose one of the additional paths in the System Make Path to act as a Global Library.

Pick the location for the Global Library that will be created.

A global library (Global.sws) will be created in the selected folder and that library will automatically be added to the migrated workspace.

See the information about workspaces and libraries.

Of Special Note

The migration wizard assumes that all source code for a standard global subclass layer is located in the \usr\global\AppSrc folder of the host Visual DataFlex revision being migrated from. If any source code used in a global subclass layer is located elsewhere, it will not be found and properly migrated.

Next Step

Library Candidates

See Also

What actually happens during migration


Workspace Migration Library Candidates

Any path that is listed in the System Make Path or in the workspace file as a secondary AppSrc path of the workspace is considered a candidate for a library.

The migration process does not convert these candidates into a library, but it allows you to connect to existing libraries or move them to a location where that conversion can be made without impacting any other folders.

So if the analysis determined that the host environment or workspace has library candidates (other than any path selected as a Global Library), you may choose to:

  1. Connect to Existing Library:

    This option allows you to select the SWS file of a library workspace. The SWS file of the migrated workspace will contain the path to the library's SWS file.

  2. Copy to a different folder:

    This will not migrate the library candidate to a Library Workspace. It will simply copy all files from the existing location to the new location and append the new location to the AppSrcPath of the migrated workspace.

  3. Use Current Location:

    This option will not copy the existing files anywhere, but leave them in place and add (if not already there) the existing location to the AppSrcPath of the migrated workspace. The downside to this approach is that multiple versions of Visual DataFlex may be sharing this source code and all the changes you make to the source of that library will affect all code in all the Visual DataFlex revisions that use this library.

We recommend that you connect to an existing library!

This may mean that you should halt an existing workspace migration in order to migrate your Library Candidates first. Please review Library Workspaces and Migration to read about the benefits of creating Library Workspaces and how simple it is to create them.

Next Step

Library Workspaces and Migration

See Also

What actually happens during migration


Workspace Migration Workspace Paths

You will only see this page if the migration wizard detected the use of external directories in the paths specified in the workspace .WS file. External directories are directories that are not subfolders of your workspace Home directory.

The paths listed here are grouped by their type: AppHTMLPath, BitmapPath, DataPath, DDSrcPath, HelpPath, ProgramPath and FileList.

For each path in each group you may choose to:

  • Point to Existing Location:

This option allows you to select an existing location that should used for the migrated workspace. This location will replace the current location in the workspace WS file.

  • Copy to a different folder:

This option will simply copy all files from the existing location to the new location and then replace the current location in the migrated workspace WS file with the new location.

  • Use Current Location:

This option will not copy the existing files anywhere, but leave them in place and not change the WS file of the migrated workspace for that specific path.

Next Step

Workspace Destination Folder

See Also

What actually happens during migration


Workspace Migration Workspace Destination Folder

This wizard page allows you to select the location to hold the migrated workspace.

Use current workspace folder

If you check the "Use current workspace folder" checkbox, the destination form will be disabled and the workspace migration will happen in place.

If you choose this option, be sure you have a current backup of the workspace you are migrating.

We recommend copying the workspace to a new location rather than performing the migration in place.

Clicking Next on this page will begin the migration process.

Next Step

Summary of Tasks

See Also

What actually happens during migration


Workspace Migration Summary of Tasks

This page shows a summary of the selections that were made before and that will be used to migrate the workspace. Review all the information displayed and press Back to adjust your selections.

Pressing Next will initiate the migration process.

Next Step

Migration

See Also

What actually happens during migration


Workspace Migration Migration

This is where the migration really happens using all the selections you made before. This process cannot be interrupted.

Next Step

Summary of Performed Tasks

See Also

What actually happens during migration


Workspace Migration Summary of Performed Tasks

Shows a summary of the tasks that were performed during migration according to the selections previously made.

If errors occurred or the migration wizard detected anything in your code that could prevent your workspace to work fully in the Studio, the wizard will display that information under Errors or Warnings. If there are any errors or warnings to be viewed, that number will be displayed. You can review the items listed there by pressing the corresponding button.

All items listed here, including any errors or warnings, will be output to individual log files in the root directory of the workspace so you can review them after closing the wizard.

Next Step

Completion

See Also

What actually happens during migration


Workspace Migration Completion

Displays a list of ToDo items that were identified during the migration of the workspace. The items shown here will indicate whether they are required and will have an explanation to help you decide whether or not you would choose to do them.

All items listed here will be output to a log file in the root directory of the workspace so you can review them after closing the wizard.

Next Step

When you Finish the migration, the migrated workspace will be loaded into the Studio.

See Also

What actually happens during migration


What Actually Happens during Migration

The Workspace Migration Wizard uses the same foundation technology as the Studio to learn as much as possible about the workspace you are migrating. It does this by parsing the source code.

These are the steps that are taken during a migration – items in bold are those that may require interaction:

  • Select the workspace to migrate

This is done by double-clicking the workspace file (workspacename.ws) in Windows Explorer or using the Open Workspace option on the File Menu.

  • Determine which revision of Visual DataFlex is the host for the selected workspace

This is important because there is a good chance that the workspace relies on the host environment (global subclass layer, additional build paths, etc.). If the selected workspace is not registered in any of the revisions of Visual DataFlex installed on the machine running the wizard, you will have the option to run the migration in limited migration mode.

  • Determines if there is a global subclass layer and/or library candidates

If the default location was not used when creating the global subclass layer, and the system make path of the host revision was modified, you will have the chance to indicate where your global subclass layer lives.

  • Determines the full scope of the development environment by simulating the same make paths that the workspace would use in its host environment.

  • Uses the paths in the existing .ws file.

  • Uses the system make path defined for the host revision (when in full migration mode).

  • Parses all the source files found in the primary AppSrc and DDSrc paths to discover all files and source that is used in the workspace.

  • Identifies projects within the workspace.

  • Examines the web objects to detect which are published and which are not.

  • In full migration mode:

  • Examines the classes that would be used in the workspaces controls palette so that the class palette in the newly migrated workspace can be properly initialized.

  • Examines the registry to find out whether non-standard classes are used in the host revision.

  • Reports all its findings (this is the Analysis Results tab).

  • Select the target folders -- the suggested location will always use the configured Projects folder as the starting point for the new locations

  • If you have a global subclass layer, it will be migrated into a library workspace with AppSrc set to the selected folder

  • If you have extra paths in your system make path or the workspace's AppSrcPath (in the workspace file), they will be listed as library candidates. You can select to connect to an existing library (that was already migrated) or to copy those folders to a different location to be used by the migrated workspace in its AppSrcPath or to keep them in the same location they are (they will be added to your AppSrcPath if not already there).

  • If other paths in the workspace’s ws file point at directories outside the workspace structure, you will have a chance to opt on what to do with those paths: point to a different location, copy those a different location or not make any changes (i.e. use the current path in the ws file).

  • All the copying is performed.

  • If you are migrating the workspace in place, a backup copy of the current WS file is generated.

  • All paths in the workspace (.ws) file are adjusted to the new locations.

  • If a global library is being created, workspace files (WS and SWS) are generated for it.

  • In full migration mode:

  • The DFC files are migrated – appropriate meta tags will be inserted in the respective source code files. Backup copies are made for any source files changed by this action.

  • The class palette is migrated – ClassList.xml file is created in AppSrc\Config folder.

  • FlexCOM2 ActiveX control resource information formerly provided in separate resource (.res) files are serialized directly into the source file that uses the control. Backup copies are made for any source files changed by this action.

  • Published web methods in Web Objects (.WO files) are migrated to use meta-data tags instead of 'Send RegisterInterface' statements. Backup copies are made for any source files changed by this action.

  • DDData is migrated – DDClassList.xml file is created in DDSrc folder.

  • The Studio Workspace (.sws) file for the workspace is created using relative paths.

  • In full migration mode, non-standard classes from the registry are migrated to the SWS file.

  • Temporary files with the extension listed below that are present in the migrated workspace are removed from the workspace:

  • *.PRN

  • *.FLD

  • *.PBG

  • *.PKD

  • *.PRP

  • *.TRE

  • *.ERR

  • *.DSK

  • *.DBG

  • Log files are output summarizing the tasks performed during migration, errors that occurred during migration, warnings and to-do items identified during migration.

See Also

Workspace Migration

Workspace Migration Wizard

Code Modified by the Migration Wizard

Files no longer needed after Migration


Workspace Migration Code Modified by the Migration Wizard

Code Modified by the Migration Wizard

How Changes to Source Code are Made

In order to properly migrate existing Visual DataFlex source code from revisions prior to 12.0 to work with the new (Visual DataFlex 12.0 and higher) Studio and source code parser, the Migration Wizard has to make some changes to existing source code.

Any time the Migration Wizard changes any existing source code:

  • A backup copy of the source code file being changed is created in the same folder the file is currently located in, with ".bak" appended to the end of the file name.

  • Any changes to source code are clearly marked by a comment like this above the changed code:

// Visual DataFlex 12.0 Migration Utility, added June 15, 2006: 12:12:12

  • Any code added that may not be backward compatible with Visual DataFlex revisions prior to Visual DataFlex 12.0 are surrounded by a #IF block, so that the file will still compile with earlier versions of Visual DataFlex:

#IF (!@ >= 120)

// source code added by Migration Wizard goes here
#ENDIF

Workspace (.WS) File

One exception to the rules above is the workspace (.WS) file, usually located in the Programs folder of a workspace.

This file is not source code and does not get compiled, therefore no special markers are needed to surround changes made to it. However, depending on your existing workspace setup and whether you use source code located external to the workspace (e.g. in another directory) that gets used in your workspace, this file may be modified during migration.

  • If you are migrating a workspace to a new location, the original .WS file (as well as all other original files) can be found in the migration source location and can be compared to the migrated files (in the migration destination location).

  • If you are migrating a workspace in place, a backup copy of the .WS file being changed is created in the same folder the file is currently located in. The file name of the backup file will be WorkspaceNameN.ws.bak, where N is a digit, starting with 0; so, the first backup copy would be named WorkspaceName0.ws.bak, the second copy WorkspaceName1.ws.bak, etc.

Source Code Changes Made During Migration

Below is a list of the specific changes that may be made by the Migration Wizard. The changes applied to a specific workspace will vary based on the code that exists in that workspace.

  • Initial Values and Enumeration Lists are moved from .DFC files to Meta-Data Tags

As of Visual DataFlex 12.0, the Studio and source code parser use Meta-Data tags to learn things about projects that cannot be determined explicitly from source code. In prior Visual DataFlex revisions, such information was stored in .DFC files.

The code modified during migration will look something like this:

// Visual DataFlex 12.0 Migration Utility, added June 15, 2006: 12:12:12

#IF (!@ >= 120)

{ OverrideProperty=PropertyName InitialValue=xyz }

#ENDIF

Class cFoo is a cObject

...

  • COM control property information is moved from external .res files to the source code

As of Visual DataFlex 12.0, property settings for COM controls that are used in components (e.g. an ActiveX control used in a view) are stored directly in the component source code file in which the COM control resides. In prior Visual DataFlex revisions, such information was stored in external .RES files, which were included in the source code via an Include_ActiveX_Resource statement.

The code modified during migration will look something like this:

// Visual DataFlex 12.0 Migration Utility, added June 15, 2006: 12:12:12

#IF (!@ >= 120)

Embed_ActiveX_Resource

// Embedded Binary COM property code

End_Embed_ActiveX_Resource

#ELSE

INCLUDE_ACTIVEX_RESOURCE "InsuranceNotes.res" oInLineGrid

#ENDIF

  • The psProgId property of COM classes is migrated to a CLSID meta-data tag.

As of Visual DataFlex 12.0, COM control classes require a CLSID meta-data tag to display properly in the Studio's visual designer. This class id already exists in existing COM control classes in the psProgID property.

The code modified during migration will look something like this:

// Visual DataFlex 12.0 Migration Utility, added May 18, 2006: 08:56:02

#IF (!@ >= 120)

{ CLSID="{0D12345B-ABC1-11A1-BCDE-00123456789D0}" }

#ENDIF

Class cMyCOMControl is a cComActiveXControl

Procedure Construct_Object

Forward Send Construct_Object

Set psProgID to "{0D12345B-ABC1-11A1-BCDE-00123456789D0}"

...

End_Procedure

End_Class

  • 'Send RegisterInterface' statements in Web Object (.WO) files are migrated to Published and Description meta-data tags.

As of Visual DataFlex 12.0, methods in Web Objects are published using the Published and Description meta-data tags in the Studio, instead of the RegisterInterface method (which is still used in classes).

The code modified during migration will look something like this:

// Visual DataFlex 12.0 Migration Utility, added September 23, 2006: 11:56:02

#IF (!@ >= 120)

{ Published = True }

{ Description = "Method description" }

#ENDIF

Function myFunction returns Boolean

Boolean bSuccess

...

Function_Return bSuccess

End_Function

The 'Send RegisterInterface' statement that was replaced will be commented out:

//AB-RegisterInterfaceStart

// Visual DataFlex 12.0 Migration Utility, added September 23, 2006: 11:56:02

// Send RegisterInterface get_myFunction "get_myFunction" "returns Boolean" ""

//AB-RegisterInterfaceEnd

These modifications only apply to:

  • Only methods published in prior VDF revisions using RegisterInterface that reside inside a //AB-RegisterInterfaceStart...//AB-RegisterInterfaceEnd block are migrated.

  • Only methods that are in an object of class cWebBusinessProcess or cWebService, or a subclass of cWebBusinessProcess or cWebService, are migrated.

See Also

See Also

Workspace Migration

Workspace Migration Wizard

What actually happens during Migration

Files no longer needed after Migration

Studio Meta-Data


Workspace Migration Files no longer needed after Migration

Files no longer needed after Migration

After you migrate your Visual DataFlex source code to Visual DataFlex 12 or higher, numerous files in your workspace are no longer needed. These files were migrated to the current Visual DataFlex revision for reference purposes, but are no longer used by Visual DataFlex. You may delete these files if you wish.

  • ABData.*: this database used to store registered workspace components, a concept that has been removed from the product.

  • DDData.*: this database contained information about DataDictionary classes for tables; this information is now stored in DDSrc\DDClassList.xml.

  • *.dfc files: these files contained information that told the old Studio certain information about classes on its Controls Palette, such as the source code file the class was defined in, initial property values and property enumeration lists.

    Initial values and enumeration lists for properties are now either read directly from Visual DataFlex source code, or embedded in source code files using meta-data tags. See meta-data for more information regarding this. Other information that was previously stored in .dfc files is no longer needed, as it is read directly from source code.

  • IdeClasses.dfc: this file was used by the old Studio to determine which classes to display on the Controls Palette. The new Studio uses AppSrc\config\ClassList.xml for its Class Palette.

  • *.res: FlexCOM2 ActiveX control resource information formerly provided in separate resource (.res) files is now serialized directly into the source file that uses the control.

See Also

Workspace Migration

Workspace Migration Wizard

What actually happens during Migration

Code Modified by the Migration Wizard


Workspace Migration - Library Workspaces and Migration

Library Workspaces and Migration

Migrate Your Library Candidates to Library Workspaces before migrating workspaces that use them!

Creating Library Workspaces from library candidates, such as global workspace layers and third party utilities like VDFQuery makes migration a snap! Once a Library Workspaces has been created, when migrating you simply browse to the .sws file for it and the Migration Wizard figures out the rest.

Why Library Workspaces?

There are other compelling reasons besides simplifying migration to create Library Workspaces. Generally, working in Visual DataFlex becomes easier to manage if you use Library Workspaces, both on the library side, as well as in the workspaces that use these libraries.

  • Library Workspaces are Regular Workspaces

    A Workspace Library is a Visual DataFlex workspace like any other. This means that in order to work on a particular Library Workspace, you can load it up in the Studio, then modify it as you would any other workspace.

  • Using Library Workspaces in Other Workspaces Simplifies Your Work

    Workspaces can use Library Workspaces very easily and get multiple benefits in a single step. Once a Library Workspace is added to a workspace, the Studio can immediately utilize that Library Workspace to the fullest:

  • It can import and customize any or all items from the Library Workspace's Class Palette.

  • It can use and compile any code in the Workspace Library.

Creating Library Workspaces

You can easily turn any existing library candidate into a Library Workspace, even if the library candidate consists of just a folder with some source code.

If the library candidate in question is a workspace from a revision of Visual DataFlex between 8.0 and 11.1 and you have the host Visual DataFlex Studio revision installed with that workspace registered in it, you can migrate it to become a Workspace Library by using the Migration Wizard:

  1. Open the Studio.

  2. Select 'Open Workspace' from the File menu.

  3. Change the selection in the 'Files of type' combo to 'Workspaces to migrate (*.ws) and browse to the .ws file of the workspace you wish to migrate.

  4. Follow the Migration Wizard steps.

  5. The Studio will open the migrated workspace when migration has completed.

If the library candidate in question is not a workspace from a revision of Visual DataFlex between 8.0 and 11.1 or you do not have the host Visual DataFlex Studio revision installed with that workspace registered in it, you can manually turn it into a Workspace Library by following these steps:

  1. Open the Studio and create a new workspace, then close the Studio.

  2. Copy all source code from the existing library candidate folder(s) to the new workspace's AppSrc folder.

  3. Copy all bitmaps from the existing library candidate folder(s) to the new workspace's Bitmaps folder.

  4. Copy all DataFlex object preference (.dfo) files from the existing library candidate folder(s) to the new workspace's AppSrc\config folder.

  5. Copy all template (.tpl) files from the existing library candidate folder(s) to the new workspace's AppSrc\config folder.

  6. Open new workspace in the Studio and ‘Configure Create New’ to add your templates to the Create New dialog.

  7. Configure the Class Palette, if there are classes you would like to have on it. You can very easily configure the Class Palette by simply right-clicking on it to create new Groups and new Classes.

See Also

What actually happens during migration


Studio Meta-Data

The Studio parses source code and meta-data to assemble information about the source code. It uses the assembled information for working with the code, for displaying properties in the Object Properties window, CodeSense, displaying objects and other nodes in the code editor, visual designer, etc.

Meta-data literally means "data about data"; it is information that describes another set of data. Visual DataFlex meta-data provides specific information about the source code (e.g. a class, method or property) that cannot be obtained explicitly from the source code itself.

A simple example of meta-data in Visual DataFlex source code is this:

{ Visibility=Private }

Class cMyButton is a Button

// …

End_Class

Read more about applying meta-data to your source code in these topics:

  • Meta-Data Tag Format and Rules (applies to all meta-data tags)

  • Class Meta-Data Tags

  • Class Member Meta-Data Tags

  • Object Member Meta-Data Tags


Meta-Data Tag Format and Rules

Format

There are three elements to a meta-data declaration:

  1. The meta-data tag set declaration.

  2. A description of the code constructs being declared (optional).

  3. The actual code construct declaration (e.g. a class, method or property declaration etc).

Meta-Data Tag Syntax

Meta-data tags are defined inside curly braces {} using name = value pairs. Meta-data tag set syntax will take the following general format:

{ name=value name="value" name="value1, value2, value3"}

-or-

{ name=value }

{ name="value" }

{ name="value1, value2, value3" }

-or-

{

name=value // Comments are supported at the end of each line

name="value"

name="value1, value2, value3"

}

Rules

  • 'Name' must belong to one of the public tag name values in the tables listed in Class Meta-Data Tags or Class Member Meta-Data Tags. An undefined name is considered to be an error.

  • 'Value' can be any string of alpha-numeric characters.

  • If the value contains white space, quote characters a comma or '}' characters, then it must be enclosed in single or double quotes.

  • Multiple values for a single name can be defined as a comma-separated list.

  • Multiple tag sets (e.g. { … } ) may be defined for a single code construct.

  • The tag list can be defined over several contiguous lines.

  • The name=value pairs are separated from each other using a white space character or a new line.

  • Each individual name=value must start and end on the same line.

  • The order of meta-data tags is not significant, except when explicitly stated.

  • Meta-data tag set must be declared physically above the code construct being described.

  • Only blank lines and the description can appear between the meta-data tag set and the code construct being declared.

  • White space can be used to separate the name=value (e.g. name = value).

  • Meta-data tags are not case sensitive.

  • A meta-data tag set must appear on its own line; i.e. it cannot be mixed with other VDF commands on the same line.

See Also

  • Studio Meta-Data

  • Class Meta-Data Tags

  • Class Member Meta-Data Tags

  • Object Member Meta-Data Tags


Class Meta-Data Tags

See Also: Studio Meta-Data

Below is the listing of all class meta-data tags. Read Meta-Data Tag and Format Rules for details on how to apply these tags to your Visual DataFlex source code.

Meta-Data Tag Inheritance

All class meta-data tag values are inherited by their sub-classes. In most cases, your classes will be derived from classes where all of the meta-data is already properly set and you will not need to set any new meta-data values. The exception to this will be the OverrideProeprty meta-data tag.

Public Class Meta-Data Tags

This table represents all valid public meta-data tags for classes. Using class meta-data tags other than the public tags listed here is considered a coding error.

Tag Name | Description
ClassType | Used by Studio CodeSense and designers to determine the class type.
ComponentType | Used by the Studio to determine what component category a source file belongs to.
CompositeClass | Used to assign a tab page class to a tab dialog class, to be used by Studio designers to determine which class to use when placing tab page objects inside tab dialog objects.
DesignerClass | Used by Studio designers to determine how to represent a class.
OverrideProperty | Used to specify that the information in this tag set should be applied to the property name for this class.
Visibility | Used by Studio CodeSense and designers to determine how a class should be exposed.
Obsolete | Specifies that the class is obsolete

Private Class Meta-Data Tags

This table represents all private meta-data tags for classes. You may see these tags used in the Visual DataFlex package library. Private tags are not documented and not intended for developer implementation. Developers' classes will inherit tags indicated by private meta-data tags when subclassing from the Visual DataFlex class library and these inherited settings should not be changed.

Tag Name | Description
ClassLibrary | Determines if a class is to be used by windows projects, web projects or both. This is ssed internally by the Visual DataFlex class documentation to generate class reference help.
ColumnBased | Determines if a class is column based (e.g. grids).
DataAware | Determines if the class uses a Data Dictionary server and supports the Data Dictionary interface. Applied to container objects.
DataBindable | Determines if the class is bound to a data source (i.e., is bound to table/column values). A data bindable class is always data aware. Applied to control objects.
ddoHost | Determines if the class supports data dictionary object structures. An example of a ddoHost is a dbView.
HelpTopic | The name of the class to be used when using the help system. This gives developer defined sub-classes, which are not part of the product help system, the ability to find help on the most appropriate superclass. This works through meta-tag class inheritance.
CLSID | Sets the ProgId of an COM object. This is used by the Studio to display COM controls within the Visual Designer. This is assigned by the COM class generator.

See Also

  • Studio Meta-Data

  • Class Member Meta-Data Tags

  • Object Member Meta-Data Tags


ClassType Class Meta-Data Tag

See Also: Class Meta-Data Tags, Classes, How To Use the Class Reference

Purpose

Used by Studio CodeSense and designers to determine the class type.

Syntax

{ ClassType={TypeName} }

where {TypeName} can be one of:

  • Abstract: Type for abstract classes. Abstract classes are classes that can be used for sub-classing but are never used for object instantiation.

  • Mixin: Type for mixin classes (classes that do not get instantiated; mixin classes are classes whose methods get mixed-into other classes; see multiple inheritance); default for any class derived from the Mixin class

  • Normal: Type for non-mixin and non-abstract classes; default for any non-mixin classes

Use

The properties of normal classes are visible in the Studio's Properties panel, those of abstract and mixin classes are not. To indicate that a class is abstract or a mixin class, add the ClassType meta-data tag above the class declaration line.

Example:

{ ClassType=Abstract }

Class cMyAbstractClass is a cObject

End_Class // cMyAbstractClass


ComponentType Class Meta-Data Tag

See Also: Class Meta-Data Tags

Purpose

Used by the Studio to determine what component category a source file belongs to.

Syntax

{ ComponentType={TypeName} }

where {TypeName} can be one of:

  • WinAppClass: Windows application projects

  • WebAppClass: Web application projects

  • DDClass: Data Dictionaries

  • VWClass: Views

  • RVClass: Report Views

  • DGClass: Dialogs

  • SLClass: Selection Lists

  • BPClass: Business Processes

  • WSOClass: Web Service Objects

  • WBOClass: Web Browser Objects

Use

The Studio uses predefined categories to classify source files as components, such as views or reports. In most cases, developers would not override this classification. An exception may be if a class is not used as the component type the Studio typically uses this class for, but modified for another purpose.

Example:

The dbModalPanel is used by the Studio as a container for selection lists. A developer could use this class to create a modal view component, and thus may want a source file to be listed as a view rather than a selection list.

This sample code shows how to indicate that a class should be listed as a view component instead of a selection list component.

{ ComponentType=VWClass }

Class dbModalView is a dbModalPanel

End_Class // dbModalView

Of Special Note

The ComponentType class meta-data tag is inherited.


CompositeClass Class Meta-Data Tag

See Also: Class Meta-Data Tags

Purpose

Used to assign a tab page class to a tab dialog class, to be used by Studio designers to determine which class to use when placing tab page objects inside tab dialog objects.

Syntax

{ CompositeClass={CompositeClassName} }

where {CompositeClassName} is the name of the tab page class to be used when placing tab page objects inside tab dialog objects of the class this meta-data tag is assigned to.

Use

This meta-data tag can be set to assign a tab page class to a tab dialog class, to be used by the Studio whenever creating tab page child objects inside a tab dialog object.

This is currently only used by TabDialog derived classes. If a new TabDialog sub-class is created and you wish want that class to use a new TabPage class, you would set the class name using CompositeClass. When the Studio creates new tab pages objects, it will use this new class.

Example:

If a developer creates custom tab dialog and tab page classes, named cMyTabDialog and cMyTabPage, respectively, and wants the Studio to use objects of class cMyTabPage whenever adding tab pages to objects of class cMyTabDialog, the developer can place the CompositeClass meta-data tag above the class declaration line and set it to cMyTabPage.

{ CompositeClass=cMyTabPage }

Class cMyTabDialog is a cTabDialog

End_Class // cMyTabDialog

Of Special Note

The CompositeClass class meta-data tag is inherited. If a superclass is assigned a particular composite class, any subclasses of that class will use the same composite class.


DesignerClass Class Meta-Data Tag

See Also: Class Meta-Data Tags

Purpose

Used to assign a class to a designer class, which, in turn, is used by Studio designers to determine how to represent a class.

Syntax

{ DesignerClass={DesignerClassName} }

where {DesignerClassName} can be represented visually as one of:

  • cDTAnimation: an animation control class

  • cDTButton: a button class

  • cDTCheckBox: a checkbox class

  • cDTComControl: a COM class -- this is typically assigned to COM classes.

  • cDTComDocument: a COM embedded document class -- this is typically assigned to COM cComDocumentObject classes.

  • cDTComboForm: a combo form class

  • cDTContainer3D: a container class

  • cDTForm: a form class

  • cDTEdit: a text edit class

  • cDTGrid: a grid class

  • cDTGroup: a group class

  • cDTLineControl: a line control class

  • cDTListBox: a listbox class

  • cDTModalPanel: a modal panel class

  • cDTProgressBar: a progress bar class

  • cDTRadio: a radio class

  • cDTRadioGroup: a radiogroup class

  • cDTSpinForm: a spinform class

  • cDTTabDialog: a tab dialog class

  • cDTTabPage: a tab page class

  • cDTTextbox: a textbox class

  • cDTToolPanel: a tool panel class

  • cDTTrackbar: a trackbar class

  • cDTTreeView: a treeview class

  • cDTView: a view class

Use

This meta-data tag can be set to assign a particular representation to a class in the Studio's visual designer.

In most cases, developers will not need to set this tag. Here are some rules of thumb about when to set the DesignerClass tag:

  • If a developer subclasses an existing modeled class, he/she will not need to specify a designer class, because it will be inherited from the modeled superclass, and thus behave like that superclass when modeled.

  • If a developer imports an ActiveX or other COM control, he/she will not need to specify a designer class, because the visual appearance will be picked up from the COM control.

  • The only time a developer might need to specify a designer class is if he/she is wrapping some kind of dll common control in a class. The two most likely classes that such a class will be based on are DfBaseControl and cWinControl. Now, when doing this, there is no way to get an accurate visual representation of the control, because the Studio doesn't know anything about the control. The developer will want to pick the simplest design time class that comes closest to representing the control. Typically, this would be cDTForm, cDTEdit or cDTListBox, which are all just variants of a rectangle. The main things this will allow the Studio to model for these controls will be size, location, color and textcolor.

Most of the designer class acquired through class inheritance will provide the best results.

Note this is used to assign the most appropriate Visual Designer control to a class. When the Visual Designer attempts to display an object it will base it on the assigned designer class. If you use this tag, assign the designer class that best represents your class. Creating mismatches, such as assigning a cForm to a cDTButton, will only result in wrong modeling.

Example:

To indicate that a class should be represented as a list box control in the Studio's visual designer, add the DesignerClass meta-data tag above the class declaration line and set it to cDTListBox.

{ DesignerClass=cDTListBox }

Class cMyCustomControl is a cWinControl

End_Class // cMyCustomControl

Of Special Note

The DesignerClass class meta-data tag is inherited. If a superclass is assigned to a particular designer class, any subclasses of that class will be assigned to the same designer class.


OverrideProperty class meta-data tag

See Also: Class Meta-Data Tags

Purpose

Used to specify that the information in this tag set should be applied to the property name for this class, where the property is an inherited property, not one defined in the current class.

Syntax

{ OverrideProperty={PropertyName} {ClassMemberMetaDataTagName}=MyValue }

where:

  • {PropertyName} is the name of the property for which the to override the value of {ClassMemberMetaDataTagName}

  • {ClassMemberMetaDataTagName} is the name of the class member meta-data tag to override

Note: OverrideProperty must be the first name in the tag-set and all other name / value pairs in the tag set will be applied to PropertyName.

Use

This is used to change class member meta-data tag (e.g. InitialValue, DesignTime, etc.) values in a subclass.

Sometimes, the value of a property meta-data tag is different in a subclass of the class where the property was originally declared. To indicate this, use the OverrideProperty class meta-data tag.

To declare the meta-data tag value of a property that is declared in the current class, use the appropriate class member meta-data tag.

OverrideProperty can be used to override the value of any class member meta-data tag for the current subclass.

Example:

Sometimes the initial value of a property is changed in a subclass of the class where the property was originally declared.

Consider the following code:

Class cBeverage is a cObject

Procedure Construct_Object

forward send Construct_Object

Property String psFavoriteBeverage "Juice"

End_Procedure // Construct_Object

End_Class // cBevarage

Class cHotBeverage is a cBeverage

Procedure InitializeClass

Set psFavoriteBeverage to "Tea"

End_Procedure // InitializeClass

End_Class // cHotBevarage

The property psFavoriteBeverage is declared in class cBeverage and initialized to "Juice". In cHotBeverage, a subclass of cBeverage, the initial value of the inherited property is changed to "Tea".

As in example 2, the code parser will not be able to read the initial value of a property whose initial value is set in a method. To allow the code parser to read the initial value of the property in example 3, the meta-data tag InitialValue has to be set to the property's initial value. However, since the property is inherited and not declared in the subclass cHotBeverage at all, the OverrideProperty meta-data tag needs to be set to indicate that an inherited property is being overridden.

Class cBeverage is a cObject

Procedure Construct_Object

forward send Construct_Object

Property String psFavoriteBeverage "Juice"

End_Procedure // Construct_Object

End_Class // cBevarage

{ OverrideProperty=psFavoriteBeverage InitialValue="Tea" }

Class cHotBeverage is a cBeverage

Procedure InitializeClass

Set psFavoriteBeverage to "Tea"

End_Procedure // InitializeClass

End_Class // cHotBevarage

Of Special Note

The class member meta-data tag values that are set by OverrideProperty may be inherited. See the documentation for the class member meta-data tag you are overriding to see if it is inherited.


Visibility Class Meta-Data Tag

See Also: Class Meta-Data Tags

Purpose

Used by Studio CodeSense and designers to determine how a class should be exposed.

Syntax

{ Visibility=Public | Private }

where Public is the default. If this meta-data tag is not used for a class, the class is public.

Use

This meta-data tag can be set to Private to "hide" a class from all Studio design time access, including the Object Properties window and CodeSense.

To indicate that a class is private, add the Visibility meta-data tag above the class declaration line.

Example:

{ Visibility=Private }

Class cMyAbstractClass is a cObject

End_Class // cMyAbstractClass

Of Special Note

The Visibility class meta-data tag is inherited. If a superclass is flagged as private, any subclasses of that class will be flagged as private, unless it is explicitly flagged public in that subclass.


Obsolete Class Meta-Data Tag

See Also: Class Meta-Data Tags

Purpose

Used by Studio CodeSense to determine that a class is obsolete a the class should be listed

Syntax

{ Obsolete=True | False }

where False is the default.

Use

If a developer considers one of their classes to be obsolete they can set this tag. This will remove this class from the list of suggested classes provided by CodeSense.

Example:

{ Obsolete=True }

Class cMyOlcClass is a cObject

:

End_Class


Class Member Meta-Data Tags

Class Member (Property, Procedure and Function) Meta-Data Tags

See Also: Studio Meta-Data

Below is the listing of all class member meta-data tags. Read Class Member Meta-Data Rules for details on how to apply these tags to your Visual DataFlex source code.

Public Class Member Meta-Data Tags

This table represents all valid public meta-data tags for class members (properties, procedures and functions). Using class member meta-data tags other than the public tags listed here is considered a coding error.

Tag Name | Description
Category | Used by Studio CodeSense and designers to determine how a property should be grouped in the Studio's Properties panel.
DesignTime | Used by Studio CodeSense and designers to determine whether a property should be exposed in the Studio at design time.
EnumList | Used by Studio CodeSense and designers to determine valid enumerated constants that can be used as a property's value.
InitialValue | Indicates the initial value of a property.
MethodType | Used to override the natural type of the class member being declared.
PropertyType | Used to assign a pre-defined meaning to the property.
Visibility | Used by Studio CodeSense and designers to determine how a class member should be exposed.
Obsolete | Specifies that this method is obsolete

Private Class Member Meta-Data Tags

This table represents all private meta-data tags for class members. You may see these tags used in the Visual DataFlex package library. Private tags are not documented and not intended for developer implementation. Developers' classes will inherit tags indicated by private meta-data tags when subclassing from the Visual DataFlex class library.

Tag Name | Description
ColumnBased | Indicates that the method, most likely a property is column based. This implies that the property should have an item property as its first parameter. This, along with the class ColumnBased meta-data tag determines if a property will appear in the Properties or Column Properties page in the Object Properties panel.
Folded | Used to declare special runtime properties that are set with two integer values and are returned as a single folded integer value (e.g Size). This is used to display these properly in the Object Properties panel. Developer should never create folded properties.
NoDoc | Used by the Visual DataFlex class documentation system.
ItemParameter | ItemParameter=1 specifies that the first parameter is an item parameter and that it is optional. When not provided the compiler provides a default value for the this parameter. This can only be applied to system properties. Developers cannot create their own optional item parameters and therefore this setting should never be used or changed.

See Also

  • Studio Meta-Data

  • Class Meta-Data Tags

  • Object Member Meta-Data Tags


Class Member Meta-Data Tag Rules

These rules supplement Meta-Data Tag Format and Rules with information specific to class member meta-data tags.

Class member meta-data tags should be applied to class members as follows:

Properties

  • If a property is declared as public (not explicitly flagged private) on the property declaration line, the meta-data tag should be applied above the property declaration line.

Class cMyClass is a cObject

Procedure Construct_Object

forward send Construct_Object

{ TagName=Value }

Property Type pMyProperty InitialValue

End_Procedure // Construct_Object

End_Class // cMyClass

  • If the property declaration is private, the meta-data tag should be applied above the Procedure Set declaration (rather than the Function declaration), because the Procedure Set is the "settable" part of a property's accessor method pair (Procedure Set/Function).

Class cMyClass is a cObject

Procedure Construct_Object

forward send Construct_Object

Property Type pMyProperty private

End_Procedure // Construct_Object

{ TagName=Value }

Procedure Set pMyProperty Type VariableName

End_Procedure // Set pMyProperty

End_Class // cMyClass

Methods (Procedures and Functions)

  • The meta-data tag should be applied immediately above the method declaration.

Class cMyClass is a cObject

Procedure Construct_Object

forward send Construct_Object

End_Procedure // Construct_Object

{ TagName=Value }

Procedure MyProcedure

End_Procedure // MyProcedure

{ TagName=Value }

Function MyFunction

End_Function // MyFunction

End_Class // cMyClasse


Category Class Member Meta-Data Tag

See Also: Class Member Meta-Data Tags

Purpose

Used by Studio CodeSense and designers to determine how a property should be grouped in the Studio's Properties panel.

Applies To

Properties

Syntax

{ Category="{CategoryName}" }

where {CategoryName} is the name of the category under which the property will be listed in the Studio's Properties Panel. {CategoryName} should be enclosed in single or double quotes.

Use

Developers may categorize class properties in their classes in any manner they see fit. For example, appearance-related properties may be listed under category Appearance, or properties related to a specific project may be listed under a category with the project name.

Example:

This sample code shows how to indicate that a property declared on a property declaration line belongs in category Shape.

Class cCube is a cShape

Procedure Construct_Object

forward send Construct_Object

{ Category="Shape" }

Property Integer piNumberOfSides

End_Procedure // Construct_Object

End_Class // cShape

Example:

This sample code shows how to indicate that a property declared using a Procedure Set belongs in category Shape.

Class cCube is a cShape

Procedure Construct_Object

forward send Construct_Object

End_Procedure // Construct_Object

{ MethodType=Property Category="Shape" }

Procedure Set NumberOfSides

// ...

End_Procedure

End_Class // cCube

Of Special Note

The Category class member meta-data tag is inherited. If a superclass property or method is flagged as being in a specific category (e.g. CategoryA), the same property or method in subclasses of that class will be flagged as being in the same category (e.g. CategoryA), unless it is explicitly flagged as being in another category in that subclass.


DesignTime class member meta-data tag

DeisgnTime Class Member Meta-Data Tag

See Also: Class Member Meta-Data Tags

Purpose

Used by the Studio Object Properties window and designers to determine whether a property should be exposed in the Studio at design time.

Applies To

Properties

Syntax

{ DesignTime=True | False }

where True is the default. If this meta-data tag is not used for a class, the class member is exposed in the Studio at design time.

Use

This meta-data tag can be set to False to "hide" a property from the Studio's Object Properties window. Doing so will not hide the property from CodeSense or other Studio tools, only from the Object Properties window.

If you want to "hide" a class member completely from any Studio access, including CodeSense, use the Visibility meta-data tag.

To indicate that a property should not be exposed by the Studio's Object Properties window and designers at design time, add the DesignTime meta-data tag above the property declaration line.

Example:

This sample code shows how to indicate that a property declared on a property declaration line should not be exposed in the Studio at design time.

Class cSquare is a cShape

Procedure Construct_Object

forward send Construct_Object

{ DesignTime=False }

Property Integer piNumberOfSides

End_Procedure // Construct_Object

End_Class // cSquare

Example:

This sample code shows how to indicate that a property declared using a Procedure Set should not be exposed in the Studio at design time.

Class cAccount is a cObject

Procedure Construct_Object

forward send Construct_Object

End_Procedure // Construct_Object

{ MethodType=Property DesignTime=False }

Procedure Set CreditBalance

// ...

End_Procedure

End_Class // cAccount

Of Special Note

The DesignTime class member meta-data tag is inherited. If a superclass property is flagged as DesignTime=False, the same property in subclasses of that class will be flagged as DesignTime=False, unless it is explicitly flagged True in that subclass.


EnumList Class Member Meta-Data Tag

See Also: Class Member Meta-Data Tags

Purpose

Used by Studio CodeSense and designers to determine valid enumerated constants that can be used as a property's value.

Applies To

Properties

Syntax

{ EnumList="{list of enumerated constants}" }

where {list of enumerated constants} is a comma-separated list of enumerated constants that are declared somewhere in the source code.

Use

This enumeration list will be available as selections in the Studio's Properties Panel.

To indicate that a property has an enumerated list of possible values, add the EnumList meta-data tag above the property declaration line.

Example:

This sample code shows how to indicate that a property declared on a property declaration line has an enumerated list of possible values.

Enumeration_List

Define Circle

Define Oval

Define Rectangle

Define Square

End_Enumeration_List

Class cShape is a cObject

Procedure Construct_Object

forward send Construct_Object

{ EnumList="Circle, Oval, Rectangle, Square" }

Property Integer peShapeType Rectangle

End_Procedure // Construct_Object

End_Class // cShape

Example:

This sample code shows how to indicate that a property declared on a property declaration line has an enumerated list of possible values and an initial value of Rectangle (not in quotes, since it is an integer constant defined in an enumeration list).

Enumeration_List

Define Circle

Define Oval

Define Rectangle

Define Square

End_Enumeration_List

Class cShape is a cObject

Procedure Construct_Object

forward send Construct_Object

{ EnumList="Circle, Oval, Rectangle, Square" }

{ InitialValue=Rectangle }

Property Integer peShapeType

End_Procedure // Construct_Object

End_Class // cShape

Of Special Note

The EnumList class member meta-data tag is inherited. If a superclass property has a specific EnumList (e.g. "Circle, Square"), the same property in subclasses of that class will have the same initial value (e.g. "Circle, Square"), unless it is explicitly changed in that subclass.


InitialValue Class Member Meta-Data Tag

See Also: Class Member Meta-Data Tags

Purpose

Indicates the initial value of a property defined in the current class.

Applies To

Properties

Syntax

{ InitialValue={Value} }

Where {Value} is the initial value of the property.

String values should be enclosed in quotes:

{ InitialValue="My Company Name" }

Property String psCompanyName

Complex values should be comma-separated:

{ InitialValue=20, 100 }

Property Complex Size

Use

Initial values that are not set in the property declaration cannot be read by the code parser. To indicate the initial value of a property, use the InitialValue class member meta-data tag.

To indicate that the initial value of a property is changed in a subclass of the class where the property was originally declared, use the OverrideProperty class meta-data tag.

Example 1:

Consider the following code:

Property String psFirstName "John"

Since the initial value of the property is set in the property declaration, the code parser will be able to read it.

Sometimes, however, the initial value of a property cannot be set on the declaration line.

Example 2:

Consider the following code:

Property String psFirstName

Assume that the initial value of psFirstName is being set to "John" in some other method in the class. You can indicate that initial value here as such:

{ InitialValue="John" }

Property String psFirstName

Example 3:

Consider the following code:

Class cContact is a cObject

Procedure Construct_Object

forward send Construct_Object

{ Visibility=Private }

Property String psPrivateFirstName

End_Procedure // Construct_Object

{ MethodType=Property }

Procedure Set psFirstName String sFirstName

set psPrivateFirstName to "John"

End_Procedure // Set psFirstName

End_Class // cContact

The Procedure Set psFirstName method declares the property psFirstName. Since the value of the property is set in this method, the code parser will not be able to read its initial value.

In this case, the InitialValue meta-data tag is used to indicate the property's initial value, as shown below.

Class cContact is a cObject

Procedure Construct_Object

forward send Construct_Object

{ Visibility=Private }

Property String psPrivateFirstName

End_Procedure // Construct_Object

{ MethodType=Property }

{ InitialValue="John" }

Procedure Set psFirstName String sFirstName

set psPrivateFirstName to "John"

End_Procedure // Set psFirstName

End_Class // cContact

Of Special Note

The InitialValue class member meta-data tag is inherited. If a superclass property has a specific initial value (e.g. "John"), the same property in subclasses of that class will have the same initial value (e.g. "John"), unless it is explicitly changed in that subclass.


MethodType Class Member Meta-Data Tag

See Also: Class Member Meta-Data Tags

Purpose

Used to override the natural type of the class member being declared in the current class.

Applies To

Properties, Procedures and Functions

Syntax

{ MethodType={TypeName} }

where {TypeName} can be one of:

  • Event: indicates that the class member is an event

  • Method: indicates that the class member is a method

  • Property: indicates that class member is a property

The default is determined by the token being declared. For example, the default for a Function declaration is Function.

Use

Usually, this is used to specify that a Procedure Set or Function is considered to be part of a Property declaration, or that a Procedure or Function is considered to be an Event method.

Example:

This sample code shows how to indicate that a Procedure Set method is a property declaration. It declares a property with the same name a the method name, in this case, psFirstName.

Class cContact is a cObject

Procedure Construct_Object

forward send Construct_Object

{ Visibility=Private }

Property String psPrivateFirstName

End_Procedure // Construct_Object

{ MethodType=Property }

Procedure Set psFirstName String sFirstName

set psPrivateFirstName to "John"

End_Procedure // Set psFirstName

End_Class // cContact

Of Special Note

The MethodType class member meta-data tag is inherited. If a superclass member is defined as having a specific method type, the same member in subclasses of that class will have the same method type, unless it is explicitly changed in that subclass.


PropertyType Class Member Meta-Data Tag

See Also: Class Member Meta-Data Tags

Purpose

Used to assign a pre-defined meaning to the property.

Applies To

Properties, Procedures and Functions

Syntax

{ PropertyType={Predefined Property Type} }

where {Predefined Property Type}

can be one of:

  • Boolean: This can be applied to Integer data types where the property is only being used as a Boolean value. The Integer data type will exist for historical and compatibility reasons. When represented in the Object Properties Panel, value will be showln as a Boolean with a drop down True / False combobox instead of an integer.

  • Color: Color properties are modeled in a special way in the Studio – the Properties Panel lists <Color Selector...> as one of the possible choices, which, if selected, pops up a color dialog for choosing a custom color.

Note: An enumeration list must be supplied in order for the <Color Selector...> to display.

  • Anchors: Specifies that the property type is an anchor. Currently the Studio does nothing special with the setting.

  • FormDataType: Specifies that the property type is a control’s form_datatype. Currently the Studio does nothing special with the setting.

  • BorderStyle: Specifies that the property type is a border style. Currently the Studio does nothing special with the setting.

Use

This is used to assign a pre-defined meaning to the property.

Example:

This sample code shows how to indicate that property piShapeColor is of PropertyType Color. This means that the Studio Properties Panel lists <Color Selector...> as one of the possible choices for this property, which, if selected, pops up a color dialog for choosing a custom color. In addition, this sample shows how to define an enumerated list of predefined colors as possible values for piShapeColor, and how to specify that piShapeColor should be listed in the Studio Properties Panel under Category Appearance.

Class cShape is a cObject

Procedure Construct_Object

forward send Construct_Object

{ PropertyType=Color }

{ EnumList= "clScrollBar, clBackground, clActiveCaption, clInactiveCaption, clMenu, clWindow" }

{ EnumList+="clWindowFrame, clMenuText, clWindowText, clCaptionText, clActiveBorder" }

{ EnumList+="clInactiveBorder, clAppWorkSpace, clHighlight, clHighlightText, clBtnFace" }

{ EnumList+="clBtnShadow, clGrayText, clBtnText, clInactiveCaptionText, clBtnHighlight" }

{ EnumList+="cl3DDkShadow, cl3DLight, clInfoText, clInfoBk, clDefault, clNone" }

{ EnumList+="clAqua, clBlack, clBlue, clDkGray, clFuchsia, clGray, clGreen, clLime, clLtGray" }

{ EnumList+="clMaroon, clNavy, clOlive, clPurple, clRed, clSilver, clTeal, clWhite, clYellow" }

{ Category=Appearance }

Property Integer piShapeColor clNone

End_Procedure // Construct_Object

End_Class // cShape

This next sample shows how an Integer property can be treated as a Boolean within the Object Property Panel.

{ PropertyType=Boolean }

Property Integer Status_Panel_State True


Visibility Class Member Meta-Data Tag

See Also: Class Member Meta-Data Tags

Purpose

Used by Studio CodeSense and designers to determine how a class member of the current class should be exposed.

Applies To

Properties, Procedures and Functions

Syntax

{ Visibility=Private | Public }

where Public is the default. If this meta-data tag is not used, the property, procedure or function will be public.

Use

This meta-data tag can be set to Private to "hide" a class member from all Studio design time access, including the Object Properties window and CodeSense.

If you want to "hide" a property only from the Object Properties window, but allow it to still be visible in CodeSense, use the DesignTime meta-data tag.

To indicate that a class method or property is private, add the Visibility meta-data tag above the method or property declaration line.

Example:

Class cContact is a cObject

Procedure Construct_Object

forward send Construct_Object

{ Visibility=Private }

Property String psPrivateFirstName

End_Procedure // Construct_Object

{ MethodType=Property }

Procedure Set psFirstName String sFirstName

set psPrivateFirstName to "John"

End_Procedure // Set psFirstName

End_Class // cContact

Of Special Note

The Visibility class member meta-data tag is inherited. If a superclass property or method is flagged as private, the same property or method in subclasses of that class will be flagged as private, unless it is explicitly flagged public in that subclass.


Obsolete Class Member Meta-Data Tag

See Also: Class Member Meta-Data Tags

Purpose

Used by Studio CodeSense and the Object Property Panel to determine that a method is obsolete and should not be listed.

Applies To

Properties

Syntax

{ Obsolete=True | False }

where False is the default.

Use

If a developer considers one of their methods to be obsolete they can set this tag. This will remove this method from the list of suggested methods provided by CodeSense and will remove the method from the Object Properties Panel

Example:

Class cContact is a cObject

Procedure Construct_Object

forward send Construct_Object

{ Visibility=Private }

Property String psPrivateFirstName

End_Procedure // Construct_Object

{ MethodType=Property }

{ Obsolete=True }

Procedure Set psFirstName String sFirstName

set psPrivateFirstName to "John"

End_Procedure // Set psFirstName

End_Class // cContact


object member meta-data tags

Object Member (Procedure and Function) Meta-Data Tags

See Also: Studio Meta-Data

Below is the listing of all object member meta-data tags. Read Object Member Meta-Data Rules for details on how to apply these tags to your Visual DataFlex source code.

Public Object Member Meta-Data Tags

This table represents all valid public meta-data tags for object members (procedures and functions). Using object member meta-data tags other than the public tags listed here is considered a coding error.

Tag Name | Description
Published | Used by the Studio to indicate that a Web Object method is published (part of the exposed interface).
Description | Indicates the public description of the method.


Object Member Meta-Data Tag Rules

See Also: Object Member Meta-Data Tags

Object Member Meta-Data Tag Rules

These rules supplement Meta-Data Tag Format and Rules with information specific to object member meta-data tags.

Methods (Procedures and Functions)

  • The meta-data tag should be applied immediately above the method declaration.

Object oMyObject is a cMyClass

{ TagName=Value }

Procedure MyProcedure

End_Procedure // MyProcedure

{ TagName=Value }

Function MyFunction

End_Function // MyFunction

End_Object // oMyObject


Published Object Member Meta-Data Tag

See Also: Object Member Meta-Data Tags

Purpose

Used by the Studio to indicate that a Web Object method is published (part of the exposed interface).

Applies To

Properties

Syntax

{ Published=True | False }

where False is the default.

Use

This meta-data tag can be set to True to make a method part of the exposed interface of a web application or web service.

This meta-data tag may only be applied to methods that reside in object of classes cWebBusinessProcess or cWebService, or objects of subclasses of cWebBusinessProcess or cWebService.

Example:

This sample code shows how to indicate that a method declared in a web service object should be exposed (meaning that it may be called by a client consuming the web service).

Object oMyWebService is a cWebService

{ Published = True }

{ Description = "Hello World function, returns Hello + name" }

Function HelloWorld String sName returns String

String sResult

move ("Hello, " + sName) to sResult

Function_Return sResult

End_Function // HelloWorld

End_Object // oMyWebService


Description Object Member Meta-Data Tag

See Also: Object Member Meta-Data Tags

Purpose

Indicates the public description of the method.

Applies To

Properties

Syntax

{ Description={Vaue} }

Where {Value} is the "public" description of the method.

Use

This meta-data tag can be set to a value that will be used as the public description part of the exposed interface of a web application or web service.

This meta-data tag may only be applied to methods that reside in object of classes cWebBusinessProcess or cWebService, or objects of subclasses of cWebBusinessProcess or cWebService.

Example:

This sample code shows how to associate a public description with a method declared in a web service object.

Object oMyWebService is a cWebService

{ Published = True }

{ Description = "Hello World function, returns Hello + name" }

Function HelloWorld String sName returns String

String sResult

move ("Hello, " + sName) to sResult

Function_Return sResult

End_Function // HelloWorld

End_Object // oMyWebService


Customizing Your Development Environment

  • Object Creation Preferences

  • Template Components

  • Command Line Options


Object Creation Preferences

Each class can have an associated preference file (classname.dfo). This file can be used to set properties, add custom source code, or, to create additional child objects. When a new object is created by the Studio, the object’s preference file is processed and added to the object. These optional preference files are located in the \Pkg\Config folder (for the system library, these files are read-only) and in the \AppSrc\Config folder for workspace augmentations and subclasses. They are given the same name as their class with a file extension of ".dfo". For example, a Button preference class would be named button.dfo. These look like standard DataFlex source code.

The system class library has many preference files in place.

Examples

Here are some examples of how object creation preferences are used.

Button.dfo

When a button class is created, we use this file to automatically create a template OnClick Procedure. When you drop the object and view the source you will see the following code already in place:

Procedure OnClick

...

End_Procedure

Grid.dfo

When a Grid is dropped into a Component, the grid will be created with three columns labeled Column 1, Column 2 and Column 3.

RadioGroup.dfo

When a RadioGroup object is created it will automatically create three radio child objects labeled Radio Label 1, Radio Label 2 and Radio Label 3. In addition, it will create a template Notify_Select_State procedure. When you drop the object and view the source you will see the following code already in place:

Procedure Notify_Select_State integer iToItem integer iFromItem

//for augmentation

End_Procedure

See Also

Customizing Your Development Environment


Template Components

Templates

Template Management

The contents of the Create New panel is determined by template definition files that are present in your environment. Each workspace uses two templates definition files, a system templates definition file, located in the system config directory (e.g. c:\program files\visual dataflex 12.0\pkg\config\templates.xml) and a workspace templates definition file, located in you primary appsrc area (e.g. c:\projects\order entry\appsrc\config\templates.xml). These are XML files that contain a list of all the components that can be used. When a workspace is loaded it reads the contents of the system templates definition file and, if present, reads the contents of the Workspace templates definition file. It combines the two and presents the list of components in the Create New dialog.

Each component in this list is created by either:

  1. Running a wizard. Those components have a File extension ".exe".

  2. Loading the file based on a template. Those components usually have file extensions ".tpl" although they can be anything other than .exe.

  3. Special predefined names that the Studio understands. These are used to run special internal processes. Currently those reserved names are CLIENTWEBSERVICE, IMPORTACTIVEX, IMPORTAUTOMATION and IMPORTEMBEDDEDOBJECT.

The contents and actions of a workspace's create new options can be customized in two ways. You can alter the contents of the templates definition file (i.e, the list that contains all of the templates) or you can change the actual contents of any template file.

Altering the Contents of a Single Template File

Template files work in a straight forward manner. When you create a component using a template, the contents of that file is copied into your new file. What you see, is what you get. If you want a template file to behave differently simply change the contents of the template file.

You can change anything you want in a template. You can change the names of classes, you can add additional "use" statements and you can change the way a component is defined. Using a template, is essentially the same as loading an existing component and saving it under a different name. This is also a perfectly valid way to create new components and may be the technique that most developers will favor.

The Studio currently uses the following template files:

MDIApplication.tpl

WebServerApplication.tpl

BlankApplication.tpl

DataEntryView.tpl

TabbedView.tpl

TableLookup.tpl

ModalDialog.tpl

dbModalDialog.tpl

AboutDialog.tpl

PasswordDialog.tpl

ReportView.tpl

WebBrowserObject.tpl

WebServiceObject.tpl

BusinessProcess.tpl

Asp.tpl

Html.tpl

ClassPackage.tpl

Package.tpl

These are all located in the system config directory (e.g. c:\program files\vdf12.0\pkg\config). These are factory installed templates and should never be changed. If you wish to change a template you must make a copy and place in your workspace's config directory (e.g. c:\projects\order entry\appsrc\config\) or in a library's config directory. Once it is saved in a directory, you can change it any way you want.

When a template is used, the Studio always first looks in the local workspace config directory for the file. If it finds it, it will use it first. If the template is not found, it will look for the template file in one of your library config directories. If not found in the library config areas, it finally looks in the system config area. If it is not found, an error is reported.

If you wish to alter a template for a specific workspace, you should copy the template into the workspace directory and change it. If you wish to make changes in a template that will be used across workspaces you should create a library and place the template file in the library. In most cases, the library will also contain the classes needed to support the template.

See Also

Customizing Your Development Environment


Studio Command Line Options

Command Line Options

The Studio can be launched with the following command line options:

"<any filename>" - opens the passed file. (should be full path & filename of a text file).

-x"<workspace filename>" - opens the passed workspace. (should be full path & filename of a workspace .sws or .ws file).

-p"<project filename>" - makes the passed project the current project. (should be the file name, without path, of a registered .src project).

-d - Instructs the Studio to run the workspace's current project in the debugger.

Any combination of the above parameters is legal. The open filename parameter may be repeated, the others should only appear once. The parameters can appear in any order but are always processed in the following order of precedence:

  1. Open Workspace

  2. Set current project

  3. Open files

  4. Debug current project.

See Also

Customizing Your Development Environment


Create Web Service Client Class

The Create Web Service Client Class Dialog is invoked by selecting the Generate button in the Web Service Client Class Generator. It is used to supply a class name and class palette group name for the client web service.


Select a Data Dictionary Object

Use this dialog to select a data dictionary objects for the Data Dictionary Object Structure.

Select the DDO that you wish from the list shown. You can sort the list by Name, Table Name, or Table Number by clicking the appropriate column heading.

Select

Click the Select button use the selected data dictionary and close the dialog.

Cancel

Click Cancel to close the dialog without selecting a DDO.

See Also:

Data Dictionary Object Structure


Sub-directory Support

Type topic text here.