XFormDBF Help - Contents

XFormDBF Help

Contents

Bottom
  • Introduction
    • Program Invocation
      • Optional Arguments
      • Action Codes
      • Return Value
    • Error Handling
    • Related Facilities
  • Main Form
    • Tabbed Pages
      • Files Page
        • Input File Button and Textbox
        • Input Grid
        • Output File Button and Textbox
        • Create/Modify Struct Button
        • Clone Button
        • Output Grid
      • Fields Page
        • List of Output Fields
        • Splitter Bar
        • Mapping Editbox
        • Command Buttons
      • Options Page
        • InitExp Button and Textbox
        • CleanupExp Button and Textbox
        • Template Button and Textbox
        • Check Boxes
      • Config Page
        • Meta-File
        • FunctionId
        • Category
        • Title
        • Notes Editbox
        • Command Buttons
          • Save Config
          • Restore Config
          • Switch To...
          • Copy...
          • Delete
          • Config...
          • Abandon
    • Main Form Command Buttons
      • Run
      • Test
      • Lookup
      • Zap
      • Exit
      • Save
      • Restore
      • Switch To...
      • Abandon

XFormDBF Forum

Discussion

Top | Unframe

VFPUtils HTML Help page, edited 04/07/00 16:12 , auto-updated: 04/09/00 19:56
URL: http://mdagw/ideaxchg/ix07/xf/xfconthh.htm
Copyright © 2000, SpaceTime Systems


XFormDBF Help - Introduction

Introduction

Contents | Bottom

XFormDBF is a general-purpose database conversion tool designed for large-scale batch processing jobs. Its primary function is to take an input table and from it to generate, record by record, a transformed output table. The user can define any number of "configurations" for either one-time or recurring conversion jobs, each with its own set of "mappings". These mappings are used to alter field names, sequence, widths, data types, etc. You can also define more complicated derived fields to handle things like code table lookups, translations, and just about any operation that can be expressed in terms of Visual FoxPro UDFs.

XFormDBF Forum

Discussion

Top | Unframe

VFPUtils HTML Help page, edited 04/08/00 21:33 , auto-updated: 04/09/00 12:11
URL: http://mdagw/ideaxchg/ix07/xf/xfhlp001.htm


XFormDBF Help - Program Invocation

Program Invocation

The simplest way to test out XFormDBF is to launch it from the VFP command window with the following command line:

xformdbf( )

When called in this manner, i.e. with no arguments, XFormDBF makes a number of default assumptions. Specifically, it assumes the default action ('Prompt' with interactive modal dialog), the default configuration (functionid = 'xformdbfdf'), and the default meta-file ('xformdbf.dbf' in the current directory).

Optional Arguments

XFormDBF supports the following 5 optional arguments:

action_arg
one of the reserved action codes, 'prompt', 'promptn', 'run', or 'runc'. Recommended macro definitions for these codes are in xformdbf.h, along with brief descriptions. The default is 'prompt' (defined as macro XFDB_ACPRM in the xformdbf.h include file), which means to use a modal dialog for interactive operation.
funcid_arg
functionid for the state (form configuration) to be restored/saved. If empty string, use the default form configuration, i.e.bypass state restoration and saving. If empty non-string value or omitted, use the default state function id, 'xformdbfdf' (macro XFDB_FUNCD).
cmdrob_arg
object reference to the generic Commander controlling the meta-file for state saving and restoration. If null or omitted, use the default Commander object specified by the global memory variable m.xfor_cmdr (this variable name is defined via macro XFDB_CMDMV). If neither cmdrob_arg nor m.xfor_cmdr refer to an object, then allocate a temporary Commander object against the default meta-file, whose name is 'xformdbf.dbf' (as specified by macro XFDB_METAD). If a character string value of cmdrob_arg is supplied, then use it as the meta-file path for allocating a temporary Commander object.
infile_arg
optional input file path. If specified and non-empty, the input file will be held to this specification, regardless of the configuration that may be restored. If empty or omitted, the input file specification will be restored from a previous saved state.
outfil_arg
optional output file path. If specified and non-empty, the output file will be held to this specification, regardless of the configuration that may be restored. If empty or omitted, the output file specification will be restored from a previous saved state.

Action Codes

The following actions are supported as the first argument to XFormDBF:

Prompt
(the default) launches an interactive, modal dialog. (A modal dialog is one that requires you to exit from the form before you can activate another window in the same process.)
PromptN
launches an interactive, Non-modal (i.e. modeless) dialog. This action does not produce a meaningful function return value, because the form continues to exist beyond the command that launched it. (A modeless dialog is useful because it allows you to run multiple applications or forms at the same time in the same process, switching between applications simply by clicking on their forms.)
Run
Restores a previously saved configuration and runs the transformation, non-interactively. In this case, the form is deliberately hidden from view, except for its progress messages in the status bar and WAIT window. The Run action bypasses the usual state-saving logic, so the saved configuration will not be altered, even if overriding input/output file arguments were supplied.
RunC
Clones and Runs. First this clones the associated template output file belonging to a previously saved configuration, and then it runs the transformation non-interactively. If an explicit output file argument is supplied, this will be the output destination. The RunC action bypasses the usual state-saving logic, so the saved configuration will not be altered, even if overriding input/output file arguments were supplied.

Return Value

XFormDBF returns a success flag result, which is set to .T. only if completely successful. In cases of errors, a mechanism is provided for obtaining detailed error information.

XFormDBF Forum

Discussion

Top | Unframe

VFPUtils HTML Help page, edited 04/09/00 20:33 , auto-updated: 04/09/00 20:33
URL: http://mdagw/ideaxchg/ix07/xf/xfhlp008.htm


XFormDBF Help - Error Handling

Error Handling

XFormDBF returns a success flag (.T. = success, .F. = failure) plus additional detailed error information in a separate ErrHandler object, derived from one of SpaceTime's foundation error-handling classes (see ...\appl\errhandl\...). The global memory variable m.xformerrh is used to hold on to this object reference, which the caller may pre-allocate. Otherwise xformdbf will automatically allocate an external ErrHandler and assign it to m.xformerrh. If m.xformerrh doesn't exist in the scope of xformdbf, XFormDBF allocates it as a PUBLIC memory variable.

The point of the external ErrHandler object is to provide a way of returning extended error information in a comprehensive, standardized way after the XFormDBF application has been run, e.g. as part of a batch processing job. When XFormDBF is run as a modal form (which includes the non-interactive cases), the form no longer exists after the command that invoked it has returned, so it won't suffice simply to store the resulting error information in the form itself. That's where the external ErrHandler comes is: it contains a copy of the detailed error information, so that the caller can decide what to do about it.

Note that if XFormDBF is allowed to make the ErrHandler allocation, the form's data session will not be released until the external ErrHandler object is released. This doesn't necessarily cause any problems, but if you wish to avoid the lingering data session, you can do so by pre-allocating an ErrHandler object and assigning its object reference to a global memory variable (PUBLIC or PRIVATE) named xformerrh. XFormDBF will then use this external ErrHandler object instead of allocating one itself, and there will be no residual data session.

Because the XFormDBF form is based on class ErrhForm, it includes a number of properties that begin with "ehp_", which are used to support error handling features. Some of these properties have been initialized via XFormDBF's property sheet in order to support the preceding defaults. If necessary, these defaults could be altered by changing these property sheet settings and rebuilding the application.

For modeless invocations of XFormDBF, you can obtain the current error information by referring directly to the ehp_... properties of the form instance in question. Since the form persists in modeless invocations, there is no need to refer an external ErrHandler object in these cases.

Refer to the xformdbf.h include file for a complete list of XFormDBF's error codes and messages, as well as other compile-time constants that may be of interest.

XFormDBF Forum

Discussion

Top | Unframe

VFPUtils HTML Help page, edited 04/09/00 20:38 , auto-updated: 04/09/00 20:38
URL: http://mdagw/ideaxchg/ix07/xf/xfhlp009.htm


XFormDBF Help - Related Facilities

Related Facilities

The XFormDBF application is built upon and integrated with a number of general purpose components of SpaceTime Systems' VFPUtils library. Here is a brief summary of these related generic modules:

Commander
A general-purpose facility for dynamically defining and executing table-driven functions, based on a meta-file of function definitions. This is actually an underlying component of the Saver mechanism. Form configurations are saved by generating a Commander-based function definition, whose later execution is used to restore the previous state.

ErrHandler
Classes and functions for support of VFP error-handling features. The main form is subclassed on the generic ErrHForm class, which gives it a number of "ehp_" properties and "ehm_" methods. This mechanism is used to support a way of returning detailed error information, as well as providing extensive error detection and reporting capabilities.

Saver
A class library and accompanying dialog forms for supporting state-saving and restoration features, which are covered by the Config Page. When a form's state or "configuration" is saved, a Commander-based state-restoration function is generated and stored in a "meta-file". The execution of a such a state restoration function returns an object to its previous state. An unlimited number of different configurations can be stored in one or more meta-files. A configuration consists of all the user-settable parameters of an object, e.g. window sizing and placement, but not including the contents of external files or tables that may be referenced by the object's properties.

SplitCon
A general- purpose class library for supporting split containers and splitter bars. This is used in both Saver's Switch To... dialog and the Fields page of XFormDBF.

Assorted Utility Functions

In addition to the preceding subsystems, the following self-contained utility functions are useful to XFormDBF:

cmdprg.prg
generic UDF to generate/compile/run/cleanup a PRG. XFormDBF uses this for optimization of its runtime processing logic, unless you select the Don't Optimize option.
cmdrclon.prg
a Commander-related utility UDF for cloning meta-file based function definitions. Since XFormDBF's saved configurations are represented as Commander functions, this utility can be used to clone template configurations from a separate meta-file reserved specifically for this purpose.
denull.prg
generic UDF to remove all NULL values from a given table. This may be useful for pre-processing of input files before invoking XFormDBF. Otherwise, you may have to complicate mappings in order to handle NULL values without errors. Note that outer joins in SQL queries can introduce NULLs even though none of the underlying tables support them. Use of denull.prg can greatly simplify such problems and speed up processing.
docmd.prg
generic UDF to execute multiple VFP command lines in a single step. This is a handy way to create tiny VFP "programs" without having to create a true .PRG and compile it into an .FXP file. In XFormDBF, this can be used to construct simple initialization and cleanup expressions, for example.
getx.prg
generic UDF wrapper for VFP's GETEXPR command. Used by XFormDBF to obtain a new mapping expression when you double-click on an entry in the list of output field mappings. (Note that this function does not eliminate VFP's spurious validation errors when an expression contains a UDF.)
ifcmd.prg
generic UDF for conditional execution of VFP command lines. This is similar to the docmd() function, but it adds support of a simple IF...THEN...ELSE... capability. In XFormDBF, this can be used to construct simple initialization and cleanup expressions.
possave/posrest.prg
generic UDFs for saving and restoring a record position in a VFP workspace. These are used in numerous places throughout SpaceTime's VFPUtils. (Such a feature really should have been built into VFP.)
usetable.prg
generic UDF wrapper for VFP's USE command. This provides a more convenient function interface, returning a success flag result to indicate whether opening was successful. In XFormDBF, this can be used to construct simple initialization and cleanup expressions.

XFormDBF Forum

Discussion

Top | Unframe

VFPUtils HTML Help page, edited 04/09/00 20:56 , auto-updated: 04/09/00 20:56
URL: http://mdagw/ideaxchg/ix07/xf/xfhlp010.htm


XFormDBF Help - Main Form

Main Form

The main form of XFormDBF is a "dialog" style of window containing 4 tabbed pages and a series of command buttons across the bottom. Currently the form is not resizable, but support for resizing is a planned extension. The form's window title includes the name or description of the current configuration. Note the little question mark symbol at the upper right corner, indicating that this application supports "What's This" help. You can also get to context-sensitive help by pressing the F1 key at any point.

Tabbed Pages

There are four tabbed pages available for setting up the parameters of a transformation job. You can use XFormDBF to define a configuration without immediately running it until a later time, or you can return to a previous configuration and further refine, test, and run it, possibly as a recurring batch job.

Files Page
Specifies the input and output tables to be processed in this transformation.
Fields Page
Defines the field-by-field mappings to be used for constructing output fields from expressions involving input fields and possibly also including related code lookup tables.
Options Page
Contains parameters for defining initialization and termination steps that can be used to set up and clean up lookup tables to be used in this transformation. Also allows you to specify a template file used to support the Clone command, plus miscellaneous other options.
Config Page
Deals with aspects of state-saving and restoration, including provisions for specifying a configuration id, title, and description, plus related commands. Note that some of the commands logically associated with the Config page (Save, Restore, Switch To..., and Abandon) have been moved into the main form body for convenience.

Command Buttons

The following command buttons at the bottom of the form can be used from any page:

Run
Generates the output table from the input table using the currently defined mappings for this configuration. One output record is generated for each input record. All of the input records are processed in the sequence they are displayed, but you can abort the run by pressing the Escape key.
Test
Runs the transformation against the current input record only. Note that the Test command uses an un-optimized mode of processing in order to give you more detailed field-level validation messages, for easier diagnosis and debugging. Since the Test command applies only to the current input record, it is disabled unless a record is currently selected in the input file grid.
Lookup...
Invokes an application-specific lookup table maintenance facility.
Zap
Deletes all records in the output table and packs it. A confirmation dialog is used for this command.
Exit
Closes the form after saving its final configuration. This is equivalent to clicking on the form's window close box or any other conventional window closing command. Use the Abandon button instead of Exit if you want to preserve the previously saved configuration instead of updating it.
Save
Saves the current form configuration (state).
Restore
Restores the last saved configuration (state) of this form.
Switch To...
Launches a dialog that allows you to selects a different configuration and switch to it, or to define a new configuration.
Abandon
Exits from the form without saving its present configuration. This is faster than Exit, and it preserves the last previously saved configuration.

XFormDBF Forum

Discussion

Top | Unframe

VFPUtils HTML Help page, edited 04/09/00 20:15 , auto-updated: 04/09/00 20:15
URL: http://mdagw/ideaxchg/ix07/xf/xfhlp005.htm


XFormDBF Help - Files Page

Files Page

The Files page specifies the input and output tables for the transformation to be run. The contents of these tables, if they exist, are displayed in a pair of read-only grids. A pushbutton allows you to modify or create a new output table structure via VFP's Table Designer. Another pushbutton lets you Clone a template output table associated with the current configuration. (This template output file is specified on the Options page.) The Files page includes the following controls:

Input File button and textbox
Use the Input File to select the table that will be used as the source of records to be transformed. If you pick an existing table, it is opened and its contents displayed in the Input Grid below. You can also specify a file name that doesn't yet exist, for use in a later job. If you Escape or Cancel from the dialog to pick an input file, the previous setting is restored. Note that the Input File button is disabled if XFormDBF was launched with an overriding input filename argument. The accompanying read-only textbox displays the path of the input file associated with the current configuration.

Input grid
When the input table is open, its contents are displayed in the upper grid (read-only). The Test command button runs the transformation against only the currently selected input record in this grid.

Output File button and textbox
Use the Output File button to select a destination table for the output of the transformation. You can also specify a file name that doesn't yet exist, for use in a later job. If you Escape or Cancel from the dialog to pick an output file, the previous setting is restored. Note that the Output File button is disabled if XFormDBF was launched with an overriding output filename argument. The accompanying read-only textbox displays the path of the output file associated with the current configuration.

Create/Modify Struct button
Use this button to invoke the VFP Table Designer to create a new output DBF structure or to modify an existing one, whose name is shown in the output file textbox. Note that this button does not affect the structure of the template output file, which is distinct from the output file displayed on the Files page.

Clone button
Creates or replaces the currently specified output file by copying a template output table. This button is enabled only if a template output file has been specified for the current configuration, and that table exists. The Clone command provides a convenient way to make use of a library (i.e. a directory) of standard output table formats, which can be further customized for individual jobs by using the Modify Struct command.

Output grid
Displays records in the output table, if it exists. When you Run or Test a transformation, the generated output records are displayed in this read-only grid.

XFormDBF Forum

Discussion

Top | Unframe

VFPUtils HTML Help page, edited 04/09/00 16:07 , auto-updated: 04/09/00 16:07
URL: http://mdagw/ideaxchg/ix07/xf/xfhlp002.htm


XFormDBF Help - Fields Page

Fields Page

The Fields page describes the detailed "mappings" for each output field to be generated when the transformation is run. This page is divided into an upper and a lower section, with an adjustable splitter bar between them. The upper section contains a list of output fields and mapping information with some pushbuttons along the top. Below the splitter is a scrollable text editing box displaying the full mapping expression for the currently selected output field. Descriptions of all the controls on the Fields page follow:

List of Output Fields
The scrollable list above the splitter bar displays a row for each output table field that either exists, or for which there is a non-empty mapping defined in the current configuration. If an output field exists, its sequence number and attributes (type, width, and decimal precision) are displayed in the columns after the field name. When an output field's attributes are blank, it means that this is a "place-holder" mapping, which has no effect on the running of this transformation. The mapping expression is displayed in the rightmost column. If you double-click on a row of the field list, an expression builder dialog allows you to specify the mapping expression for this output field. Alternatively, you can view or edit the mapping by using the mapping editbox below the splitter.

Splitter Bar
You can reapportion the space between the upper and lower sections of this page by dragging the splitter bar between them. Each form configuration keeps track of its own setting of this position, i.e. it's not a global setting. (This feature is based on the generic SplitCon classes.)

Mapping Editbox
Below the splitter, a scrollable text editing box displays the complete mapping for the currently selected output field in the list above.

Command Buttons

Across the top is a series of small pushbuttons for sorting the output field list and resetting the mappings. Note that the order in which fields are initially listed is not a property of the saved configuration of XFormDBF, so you must explicitly sort the list to be certain of its current ordering.

Field Name
sorts the list by output field name.

Seq
sorts the list by output field sequence number, i.e. the field number in the output table structure. Note that place-holder mappings have no sequence number, because these fields are absent from the current output file.

Quick Mappings
automatically supplies trivial mappings for any output fields that currently have blank mappings, and for which there exists a correspondingly named input field. I.e. this assigns input fields to output fields with the same name, but only if no mapping has already been assigned to those output fields.

Delete Mapping
clears the mapping expression for only the currently selected output field. Note that you can't clear a mapping by double-clicking on its row in the list and using the expression builder, because a blank expression is interpreted as "no change" (like Escaping or Cancelling the dialog).

Delete All
clears all of the mapping expressions in the current configuration. When a "place-holder" mapping (i.e. one for which there exists no field in the current output table) is cleared, its row is deleted from the output field list.

Remember that you can always undo any changes you have made to the mappings (or any other aspect of the form configuration) by using the Restore pushbutton, which returns the configuration to its last Saved state.

XFormDBF Forum

Discussion

Top | Unframe

VFPUtils HTML Help page, edited 04/09/00 19:47 , auto-updated: 04/09/00 19:47
URL: http://mdagw/ideaxchg/ix07/xf/xfhlp003.htm


XFormDBF Help - Mapping Editbox

Mapping Editbox

You can view and edit the entire mapping expression for the currently selected output field by using the scrollable editbox below the splitter bar on the Fields page. This is especially helpful if you are using a modeless invocation of XFormDBF, because it allows you to easily copy and paste information from another window.

When you attempt to deactivate the mapping editbox, e.g. by clicking on another field or on the body of the form, the mapping expression is automatically validated. If there is a syntax error or other type of problem, it is reported at this point, and you must fix or clear the mapping expression before you can continue. If no error is detected, there is no message, and you can continue without interruption.

Note that the validation logic for the mapping editbox is a bit smarter than the validation that takes place when you edit a mapping by double-clicking on a row of the list of mappings above the splitter. The mapping editbox validation logic can cope with expressions involving UDFs, without generating the spurious error messages that come from VFP's GETEXPR command.

XFormDBF Forum

Discussion

Top | Unframe

VFPUtils HTML Help page, edited 04/09/00 21:00 , auto-updated: 04/09/00 21:00
URL: http://mdagw/ideaxchg/ix07/xf/xfhlp011.htm


XFormDBF Help - Options Page

Options Page

The Options page specifies parameters for setups, cleanups, a template output file for cloning, and miscellaneous checkbox options. The settings on this page would generally be established by a developer, not a "normal" user. Brief descriptions of the Options settings follow:

InitExp Button and Textbox
Clicking on this button invokes VFP's expression builder, allowing you to specify an optional input initialization function. This function, or functional expression, will be evaluated immediately after opening the input table for the current configuration. The point of this feature is to provide a "hook" for performing an application-specific step such as opening a bunch of code lookup tables. The result of evaluating the initialization expression is a success flag, i.e. .T. means initializations were successful; .F. means initializations failed, which is treated as an error. (In order to clear the current expression, you must enter at least one blank character in VFP's expression builder dialog, because entering nothing is interpreted as "no change").

CleanupExp Button and Textbox
Click this button to enter an optional expression to be evaluated when the input file is closed or closed and reopened. This allows for any required cleanup steps to be performed, such as closing lookup tables. The function return value and method of clearing this expression are similar to InitExp.

Template Button and Textbox
This button allows you to pick a template output table, which would typically be an empty table structure (including DBF, FPT, and CDX files). When there is a template file for a configuration, the Clone button on the Files Page is enabled, otherwise the Clone button is disabled. Also note that XFormDBF can be invoked non-interactively with an action that instructs it to Clone the template before running the transformation.

Note that the current implementation uses VFP's GETFILE() dialog to pick a file. Unfortunately, this causes a couple of minor annoyances: there is no default file (even though there should be), and there is no way to enter a blank value that is distinguishable from Escaping or Cancelling the dialog. When you Escape, any previously specified file name is blanked out (even though you may have intended to Escape leaving the old value as-is). Remember, however, that you can always use the Restore button to undo an accidental change. (Granted, this is a bit heavy handed, but that's the current situation.)

Check Boxes

Dev Mode
Pretty useless in its present form, this is a vestige of the origins of the XFormDBF application. This option should either be dropped, or redefined. What it does right now is to enable or disable changes to the Show Tips checkbox. (I warned you it was pretty useless!)
Show Tips
Enables or disables the display of tooltips for this form, i.e. the little messages that appear over a control when you hover the mouse.
Don't Optimize
Check this to force slower field-by-field replacement logic with field-level validation to be used when running the transformation, for diagnostic purposes. When this is unchecked (the default), XFormDBF uses a much faster algorithm. Note that the Test button always uses a slower, un-optimized method, regardless of the setting of this option. The Don't Optimize option only affects the behavior of the Run action.

XFormDBF Forum

Discussion

Top | Unframe

VFPUtils HTML Help page, edited 04/09/00 20:22 , auto-updated: 04/09/00 20:22
URL: http://mdagw/ideaxchg/ix07/xf/xfhlp006.htm


XFormDBF Help - Config Page

Config Page

The Config page contains general information about the current "configuration" (state) of the form, including where this state-saving information is stored (the meta-file), the unique configuration id (functionid), plus a user-defined category, title, and free-form text description. Command buttons are also provided for actions related to state-saving and restoration. Note that the default behavior upon exiting from the application is to save the current configuration, unless you deliberately Abandon this state. A brief explanation of the items on the Config page follows:

Meta-File
Specifies the Commander meta-file in which this configuration's state restoration function resides. The choice of meta-file is determined when XFormDBF is invoked. There is no current provision for changing this setting dynamically, although this capability may be added in the future. It is displayed here purely for informational purposes.

When you save a configuration, what actually happens is that a state-restoration function is generated and stored in the meta-file. The execution of a state restoration function causes the form to be returned to its prior state. The facilities for state-saving and restoration are derived from the generic Saver classes.

FunctionId
The id of this configuration, which is unique within a given meta-file. This serves as a concise identifier for a particular saved state. There is no hard limit on the number of different configurations you can store in a single meta-file. You can't edit the functionid directly on this page, but you can create a new functionid or switch to another one via the Switch To... button. (Note that the special case of a blank functionid disables state-saving and restoration features.)

Category
An optional, user-defined category assigned to this configuration. This is provided as a way of organizing saved states into logical groupings, but its usefulness is quite limited in the current implementation. (Further extensions are planned, for example the ability to filter and sort the list of saved configurations by category in the Switch To... dialog.)

Title
A brief description of this configuration, which is displayed in the form's window title. The Switch To... dialog allows you to pick a saved configuration from a list of their titles.

Notes Editbox
Optional free-form comments about the current configuration. You can scroll through this essentially unlimited length field.

Command Buttons

Note that the following command buttons can be configured to appear either on the Config page or on the main form body, or both. Regardless of placement, they have the same effect and they logically belong to the Config page, which is derived from the generic Saver classes.

Save Config
Saves the current form configuration (state). The form's state consists of all the user-supplied parameter settings on every part of the form, as well as the window position and sizing. The form's state does not include the contents of any external files or tables that may be referenced by these settings, only the settings themselves. The saved state actually is represented as a Commander-based function definition, whose job is to restore the form to its previous state. This function is associated with the specified functionid, and it resides in the meta-file. The Save Config button is disabled if the functionid is blank. (When you exit normally from the application, an implicit Save Config is done automatically unless the functionid is blank, regardless of what actions you may have taken. You can suppress this automatic state-saving behavior by using the Abandon button.)

Restore Config
Restores the last saved configuration (state) of this form. This is the converse of the Save Config operation. Using Restore Config is a convenient, albeit klunky way to undo any kind of unintentional changes to form settings, but this will not reverse the effects of any external file or table changes; it only bears on the state of the form itself. This button is disabled if the functionid is blank.

Switch To...
Invokes a dialog to select a different configuration and switch to it, or to assign a new unique functionid to the current configuration. Switching to another configuration does not automatically save the current one, so remember to do an explicit Save Config, if necessary, before switching to a different configuration.

Copy...
Similar to the Switch To... command, Copy... picks another existing configuration to restore into the form, but preserves the current functionid. This effectively clones another configuration into the current one. Note, however, that the meta-file of saved states is not directly altered by the Copy... command; the resulting state must be saved either explicitly via Save Config, or implicitly by exiting from the application.

Delete
Deletes meta-file records (comprising the saved state) for the current configuration. This has no immediate effect on the form's appearance, i.e. its current state, except to cause the Delete button to become disabled, indicating that there no longer exists a saved "copy" of the current state in the meta-file. If a configuration has not been saved or its saved state has been deleted, it will not be listed in the Switch To... dialog.

Config...
Launches a resizable dialog for choosing, saving, and restoring previous configurations. This dialog is a component of the generic Saver facility, essentially equivalent to the Config page. Sometimes it may be more convenient to use this separate Saved Configurations dialog, depending on application design details and typical usage patterns.

Abandon
Exits from the form without saving its present configuration. Remember that the default behavior upon exiting from a Saver-based application is to save its current state. The Abandon button overrides this, forcing the application to exit immediately without updating the meta-file of saved states. If you encounter an abnormal error or are in doubt about your most recent changes, use Abandon to assure preservation of the last clean saved state.

XFormDBF Forum

Discussion

Top | Unframe

VFPUtils HTML Help page, edited 04/09/00 20:29 , auto-updated: 04/09/00 20:29
URL: http://mdagw/ideaxchg/ix07/xf/xfhlp007.htm


XFormDBF Help - Lookup Button

Lookup Button

The Lookup command button provides a convenient way to launch an application-specific "lookup table" maintenance facility. If the Lookup button is disabled, this means that XFormDBF has not been configured to support this optional feature.

Developer Notes

There are two alternative ways to enable the Lookup button, either:

1. initialize the global memory variable, m.xfor_lkup before calling xformdbf
If this reserved memory variable is defined, xformdbf will take it to be the VFP command line to execute when the Lookup button is clicked. This approach is flexible, because it avoids "hard-wiring" any application-dependent details of the Lookup logic into xformdbf.

- or -

2. adjust the macro XFDB_LOOKUP_DFLT in include file xformdbf.h
Instead of following the above procedure every time you use xformdbf, you can define your own default Lookup command line by editing the xformdbf.h include file and rebuilding the xformdbf application. You can still override the new default by using the global mvar approach above. If m.xfor_lkup is undefined when xformdbf is invoked, the default Lookup command line specified by macro XFDB_LOOKUP_DFLT will be used.

XFormDBF Forum

Discussion

Top | Unframe

VFPUtils HTML Help page, edited 04/07/00 16:16 , auto-updated: 04/09/00 12:11
URL: http://mdagw/ideaxchg/ix07/xf/xfhlp004.htm