OVERVIEW.............An Overview of the Data-Entry (EDIT) Editor
FIELD CONFIGURATION..Editing Data-Entry Field Properties
SAVE CONFIGURATION...Saving the Data-Entry Configuration to a file
LOAD CONFIGURATION...Loading a Data-Entry Configuration from a file
FIELD PLACEMENT......Placing, Deleting, Inserting, Moving, Sorting fields
OVERVIEW
An Overview of the Data-Entry (EDIT) Editor
Description:
The Data-Entry Editor is basically a set of tools that are
invoked by Hot-Keys or menu selections while editing a
database or a group of related databases. The Data-Entry
editing system is truly a "living application" because it
allows the user and/or programmer to design the Data-Entry
configuration while working with live data. The design
tools give the user the ability to establish the following
user-configurable data-entry parameters:
1. Field locations
2. Screen window size and location
3. Field descriptors and locations.
4. Screen background design
5. Custom user-defined pull-down menu
6. Custom user-defined hot-keys
7. Field validations
8. Field display properties, i.e. pictures, colors, etc.
9. Default values
10. Field encryption
11. Group fields in up to 99 pages
When designing a data-entry screen, the database that will
be used during data-entry must also be in use when using
the Data-Entry Editor. It should be understood that there
is NO difference at all between the Data-Entry Editor and
the actual Data-Entry Program other than the fact that the
programmer is given the option of disabling hot-keys and
menu items when in actual Data-Entry mode by loading a
custom menu and/or key group or by passing a parameter to
the DC_EDITDB() function.
Both the Data-Entry Editor and the Data-Entry System are
invoked by the command EDIT from the dot-prompt or by the
function DC_EDITDB() in your application code.
See Also:
dc_editdb()
EDIT
FIELD CONFIGURATION
Editing Data-Entry Field Properties
Description:
To ADD a new column to a data-entry screen, press ALT-F4
while in the Data-Entry (EDIT) system. This will create a
new field item that will be placed "last" in the item list.
To INSERT a new field into the data-entry screen, press
ALT-F5. This will create a new field item that will be
placed in front of the currently selected field.
To MODIFY an existing field in the data-entry screen, first
select the desired field by clicking on it with the mouse
or navigating to the field with the keyboard keys. Then
press ALT-F2.
Each field item in a Data-Entry configuration has a set of
"properties" associated with the field. Some of these
properties are defined in the Field Spec. Editor, while
others are defined in the Editing Spec. Editor. The Field
Spec Editor assigns the "global" properties, ie, those that
are specific to the entire application, such as Field Name,
Type, Encryption codes, etc. The Editing Spec. Editor
assigns properties that are specific to a particular Data-
Entry configuration, ie, column location, headings, colors,
etc. Those properties which were defined at the field spec
level are displayed, however they are not editable.
A database field may occur in more than one place in a
data-entry screen, however, it can occur only once in the
actual database.
ALIAS (N)
This is a non-editable entry and is only displayed for
reference purposes. This should be the same name as the
database alias.
FIELD NAME or EXPRESSION
This may be the name of a REAL FIELD or any expression to
create a VIRTUAL FIELD. Press (CTRL-ENTER) or double-click
the mouse for a pick-list of real fields for creating the
expression. If a single field name is entered or chosen,
then it will also have the options of being an editable
field, otherwise it will be considered for display only.
FIELD TYPE
The Field Type will be calculated and filled in
automatically.
FIELD LENGTH
The field length will be calculated and filled in
automatically.
FIELD DECIMALS
The field decimals will be calculated and filled in
automatically.
DESCRIPTOR
Enter a Descriptor that will appear in the data-entry
screens. To break up the descriptor into multiple lines
on the screen, use semi-colons (;).
EDITING ALLOWED?
Click the mouse in the check area or press (ENTER) to toggle
the check mark. When checked, this entry will allow this
field to be edited in the data-entry screen, otherwise the
field can only be viewed.
DISPLAY PAGE
Enter a page number (1-99). This is the Data-Entry page
that the field will be placed into within the Data-Entry
system. The PgUp and PgDn keys are used to navigate between
field pages.
DESC DISPLAY ROW
Enter the display row to display the field descriptor.
This number is an offset from the upper left corner of the
data-entry window. If the field offset is above or below
the visible area of the screen, then the field will scroll
into the visible screen area when it is selected.
DESC DISPLAY COLUMN
Enter the display column to display the field descriptor.
This number is an offset from the upper left corner of the
data-entry window. If the field offset is to the left or
right of the visible area of the screen, then the field
will scroll into the visible screen area when it is
selected.
FIELD DISPLAY ROW
Enter the display row to display the field contents (data).
This number is an offset from the upper left corner of the
data-entry window. If the field offset is above or below
the visible area of the screen, then the field will scroll
into the visible screen area when it is selected.
FIELD DISPLAY COLUMN
Enter the display column to display the field contents.
This number is an offset from the upper left corner of the
data-entry window. If the field offset is to the left or
right of the visible area of the screen, then the field
will scroll into the visible screen area when it is
selected.
DESCRIPTOR COLOR
Enter a color string defining the color of the descriptor
for this field in the data-entry screen. Double-click
the mouse or press (CTRL-ENTER) for a color-table pick-
list.
FIELD COLOR
Enter a color string defining the color of the contents
(data) for this field in the data-entry screen. Double-
click the mouse or press (CTRL-ENTER) for a color-table
pick-list.
DESCRIPTOR PRINT
Enter a series of printer pseudo-codes to establish how
you want this descriptor printed when printing an image
of the data-entry screen. Double-click the mouse or
press (CTRL-ENTER) for a pick-list of printer codes.
FIELD PRINT
Enter a series of printer pseudo-codes to establish how
you want the field contents (data) printed when printing
an image of the data-entry screen. Double-click the mouse
or press (CTRL-ENTER) for a pick-list of printer codes.
EDIT OPTION LIST
Enter a series of characters defining any special editing
options for this field when editing the field in the
data-entry screen.
A - Capitalize First Character of each word
D - Pop Up a Date Calendar
C - Pop Up a Calculator
H - Hide Input from Displaying
P - Protect from Editing
F - File Pick-List
DISPLAY CONDITION
Enter an expression that returns a logical value. If left
empty, then the field descriptor and data will always be
displayed in the edit window. If an expression is entered,
then the field descriptor and data will be displayed only if
the expression evaluates to a logical .TRUE.
MEMO COORDINATES
Enter a set of screen coordinates if this field is a MEMO
type field and it is desired to display the contents of
the memo within the data-entry window. Pressing ALT-W
will allow you to automatically fill-in the coordinates
by dragging a window into the data-entry screen. These
coordinates position the memo relative to the upper left
corner of the data-entry window.
Select an option for displaying the memo.
DISPLAY NEVER will ignore the coordinates and not display
the memo. DISPLAY WHEN SCREEN PAINTED will display the
memo contents at the time all fields are painted on the
screen. DISPLAY WHEN FIELD SELECTED will display the
memo contents each time the MEMO field is high-lighted.
SAVE CONFIGURATION
Saving the Data-Entry Configuration to a file
Description:
After designing a Data-Entry configuration, the current
configuration, including field locations, window location,
background screens, selected page, selected field, etc. can
be saved to the DCEDIT.DBF dictionary, an array file, or
source code, for later retrieval by the editor or the
application program.
To save the Configuration to the Data-Entry dictionary,
an array file, or source code, select (F), (C) and (S) from
the pull-down menu.
A dialogue window will appear with several options for
saving the configuration and information that must be
entered by the programmer. Enter the following information:
EDIT DESCRIPTION
Enter a brief description of this Data-Entry configuration.
This description will appear in the pick-list when choosing
a configuration to load.
EDIT TAG NAME
Enter a unique name of up 8 characters for this configuration.
This name is used to group all the information together in
the DCEDIT.DBF database and also as a reference for restoring
Data-Entry configurations from functions in your source code.
FILES TAG NAME
Enter an optional tag name of any data FILE GROUP you want to
restore before restoring the Data-Entry configuration. This
must be a valid tag name in the DCFILES.DBF dictionary file.
For a pick-list of pre-established file groups, press the
CTRL-ENTER key. All databases, indexes and relations included
in this file group will be opened before attempting to paint
the Data-Entry screen.
MENU TAG NAME
Enter an optional tag name of any Menu you want to attach to
the Data-Entry screen. This must be a valid tag name in the
DCMENU.DBF dictionary file. For a pick-list of menus, press
the CTRL-ENTER key. After painting the Data-Entry screen,
the default menu will be replaced by this menu. It is
recommended that you create replacement Data-Entry menus in
the Menu Editor by first loading the template menu for the
Data-Entry system saved in the DCMENU.DBF dictionary file
under the tag name "DCEDIT", modifying the menu as desired,
then saving it under a new tag name.
CAUTION: It is possible to load a menu that will not allow
access to even the basic functions of the Data-Entry
system because they may have been re-defined. The
built-in (default) menu can be restored at any time
by pressing the ALT key simultaneously with the =
key.
KEYS TAG NAME
Enter an optional tag name of any Key Group you want to
attach to the Data-Entry screen. This must be a valid tag
name in the DCKEY.DBF dictionary file. For a pick-list of key
groups, press the CTRL-ENTER key. After painting the Data-
Entry screen, the selected key group will be loaded. It is
recommended that you create replacement Data-Entry Key Groups
in the Key Editor by first loading the template group for the
Data-Entry system saved in the DCKEY.DBF dictionary file
under the tag name "DCEDIT", modifying the group as desired,
then saving it under a new tag name.
CAUTION: It is possible to load a key group that will not
allow access to even the basic functions of the Data-
Entry system because they may have been re-defined.
The built-in (default) key set can be restored at any
time by pressing the ALT key simultaneously with the
= key.
BROWSE TAG NAME
Enter an optional tag name of any browse configuration you
want to associate with this Data-Entry screen. This must be
a valid tag name in the DCBROWSE.DBF dictionary file. For a
pick-list of Browse configurations, press the CTRL-ENTER key.
After painting the Data-Entry screen, selection of BROWSE
DEFAULT from the menu will cause this configuration to be
loaded when browsing records. If no Browse Tag Name is
entered, then any current browse configuration that has
already been loaded in memory for the same work area will be
used. If no browse configuration is currently loaded, then
the default browse configuration for the selected database
will be used.
CURRENT WORK AREA / ALL WORK AREAS
Select CURRENT WORK AREA if the Data-Entry configuration you
are saving is related to the database in the currently
selected work area only. Select ALL WORK AREAS if the
Data-Entry configuration is a set of windows for multiple
work areas.
SAVE TO DICTIONARY
Check this box if you want to save the current configuration
to the DCEDIT.DBF Data-Entry Dictionary.
CAUTION: Any configuration in the DCEDIT.DBF dictionary with
the same name as the tag name entered will be
overwritten. If you do not want to overwrite an
existing configuration, make sure to assign a unique
name.
SAVE TO ARRAY FILE
Check this box if you want to save the current configuration
to an array file. The default name for this file will be
the Edit Tag Name with the .DBE extension. When restoring
edit configurations, the SET DCLIP directory will be checked
for a file with this name and this file will be used to
restore the configuration rather than the configuration in
the DCEDIT.DBF dictionary.
WRITE SOURCE CODE
Check this box if you want to write out a source code .PRG
for restoring this configuration. The .PRG will contain a
function which will return an array that is basically a
clone of the current Data-Entry configuration. The default
name for the function will be the Edit Tag name followed by
_E(). When restoring edit configurations, the application
will be tested for the existence of this function and the
function will be called to restore the configuration rather
than the configuration in any array file or in the DCEDIT.DBF
dictionary.
See Also:
dc_editdb()
EDIT
dc_editsave()
LOAD CONFIGURATION
Loading a Data-Entry Configuration from a file
Description:
Data-Entry configurations that have the same tag name as
the ALIAS of the selected work area will automatically be
loaded the first time the EDIT command is used or the
DC_EDITDB() function is called in an application.
To restore a Data-Entry configuration with a tag name that
is not the same as the current work area alias, use the
command EDIT RESTORE [(cTagName)] from the dot-prompt or
call the function DC_EDITDB() in your application code with
the 10th parameter passed as a character string containing
the name of Data-Entry configuration to restore. If the
configuration being restored DOES NOT not reference a FILES
TAG NAME for opening databases, then all databases accessed
by the configuration must already be opened and any required
relations must already be set. You may choose to do this
by restoring work areas using the RESTORE WORK command or the
DC_WORKRESTORE() function or by individually opening
databases and indexes with commands from the dot-prompt.
If the configuration being DOES reference a FILES TAG NAME,
then all files associated with the tag name will be opened
before painting the Data-Entry screen.
When configurations are restored automatically, with the
EDIT RESTORE command, or by a parameter passed to DC_EDITDB(),
then the DC_EDITRESTORE() function that passes the Data-Entry
configuration back to the Data-Entry system will restore
configurations by the following priority:
1. The application code is tested to see if a function exists
with the same name as the EDIT TAG NAME followed by _E().
If this function exists, then it is called to retrieve the
configuration. This is the fastest method of restoring a
Data-Entry configuration.
2. The SET DCLIP directory is checked to see if a file exists
with the same name as the EDIT TAG NAME followed by .DBE.
If this "array" file exists, then it used to restore the
configuration.
3. The DCEDIT.DBF dictionary is checked to see if a
configuration exists with the EDIT TAG NAME. If it exists,
then it is used to restore the configuration.
4. If no configuration function, array file or group exists
in one of the above, then the Data-Entry screen will be
painted using a standard default configuration with all
fields displayed in a scrollable screen.
To restore a Data-Entry configuration while already in the
Data-Entry editor, select (F), (C), (L) from the menu.
RESTORE FROM DICTIONARY
Select (D) from the last sub-menu to restore a Data-Entry
configuration from the DCEDIT.DBF Dictionary file. A pick-list
will appear for choosing a configuration. If the chosen
configuration uses the same database(s) as the current work
area then the data-entry configuration for the current work
area will be updated, otherwise, the selected configuration
must contain a FILES TAG name for restoring work areas first.
If the selected configuration does not reference a FILES TAG
and the database(s) for the configuration are not already
opened, then a warning message will be displayed and the
configuration will not be restored.
RESTORE FROM ARRAY FILE
Select (A) from the last sub-menu to restore a Data-Entry
configuration from a *.DBE array file. Enter the name of the
file or press CTRL-ENTER for a pick-list of files to choose.
See Also:
dc_editdb()
EDIT
dc_editload()
FIELD PLACEMENT
Placing, Deleting, Inserting, Moving, Sorting fields
Description:
MOVING A FIELD
A field may be moved from any location on the screen to any
other location either with the keyboard or the mouse.
To move a field with either the keyboard or the mouse, the
editor must first be placed in one of the following modes:
1. DRAG DESC/FIELD MODE ( ALT-F6 key )
In this mode, both the field descriptor and the field
contents (data) will both be moved.
2. DRAG FIELD MODE ( ALT-F7 key )
In this mode, only the field contents (data) will be moved.
3. DRAG DESC MODE ( ALT-F8 key )
In this mode, only both the field descriptor will be moved.
To move a field with the keyboard, select the desired field
using the up or down arrow keys, then use the appropriate
ALT-(Arrow) key to move the field and/or descriptor to the
desired location on the screen. If any of the display
boundaries are bumped, the existing fields on the screen will
scroll.
To move a field with the mouse, double-click the left button
with the cursor on the field to move, then drag the field to
the desired location and release the left button.
After moving all fields to the desired locations, press the
(ESCAPE) key to reset Drag Mode and return to Data-Entry
mode.
DELETING A FIELD
To delete a field from the Data-Entry window, select the
desired field with the up and down arrow keys, then press the
(DEL) key. This action does not affect the database in any
way, only the Data-Entry field configuration.
MOVING A GROUP OF FIELDS
All fields, and their descriptors, in the field list (for the
selected page) may be moved up or down by one row in the
display starting at the currently selected field.
To move all fields down one row, press the (ALT-F11) key.
To move all fields up one row, press the (ALT-F12) key.
A set of fields and/or descriptors may be blocked for moving
in the display as a "group". Perform the following steps:
1. Select the desired drag mode with the (ALT-F6), (ALT-F7) or
(ALT-F8) key.
2. Select the starting field to block move with the up or down
arrow keys, then press the (ALT-F9) key to mark the start of
the block.
3. Select the ending field to block move with the up or down
arrow keys, then press the (ALT-F9) key to mark the end of
the block.
4. Use the ALT-(arrow) keys to relocate the blocked group of
fields, then press ESCAPE to reset the display to normal
display mode.
INSERTING A FIELD OR ESTABLISHING FIELD ORDER
Often times it is quicker to establish the order of the
fields by working with a field list rather than using drag
and drop methods. To order fields this way, press the (INS)
key. A list of all displayed and non-displayed fields will
appear in a pick-list. A number will appear in front of
each field that will appear in the Data-Entry window. The
number is the order of the field in the window. To reorder
fields, use the (INS) key to INSERT a field in the list,
the (DEL) key to DELETE a field from the list, or the
(ENTER) key to add a field to the end of the list. Press
the (A) key to add all remaining fields to the list and
the (R) key to remove all fields from the list.
SORTING THE FIELD LIST
Regardless of the position of the fields on the screen, the
navigation order of the fields is the same as the order of
the fields in the field list array. Navigating the screen
with the up and down arrow keys will move to the next field
in the field order, not necessarily the next logical field in
the physical location on the screen. After moving, adding,
or deleting fields on the screen, it may be desirable to
establish the editing and navigation order in the same order
as the fields appear on the screen.
To sort the field list by Row and Column, select (V), (F),
(F), and (R) from the menu.
To sort the field list by Column and Row, select (V), (F),
(F), and (C) from the menu.
Only the fields associated with the displayed page will be
re-sorted.
MOVING FIELDS TO ANOTHER PAGE
When a default Data-Entry screen is created for a database,
all the fields are assigned to Page 1 regardless of the
number of fields and the size of the Data-Entry window. If
there are more fields than can fit on the screen, then the
screen will scroll when accessing fields off the screen.
Many times it is desirable to group fields into pages so it
isn't necessary to scroll the screen to access a desired
group of fields. The data-entry system allows fields to
be grouped in as many as 99 different pages per Data-Entry
configuration.
To reassign a field to another page, first select the
page in which the field to be relocated resides by using the
PgUp/PgDn keys or ALT-1 thru ALT-9 for pages 1 thru 9. Use
the Up/Down arrow keys to highlight the desired field to
move then press key (ALT-F2). A dialog screen will be
displayed for modifying Data-Entry properties for the
selected field. Select the second dialog screen with the
PgDn key, then enter the new DISPLAY PAGE number and press
F10 to save.
ASSIGNING THE PLACEMENT OF A GROUP OF FIELDS
To assign a group of fields to a specified page or to align
a group of fields into a specified pattern on the screen,
press (ALT-F3) to Browse the field list, then select (S) and
(L) to reassign the location of a group of fields. A dialog
window will be displayed for entering the location assignment
of the desired group of fields. Enter the following
information:
DESCRIPTOR START ROW
Enter the start row to place the Descriptor of the first
field. This is a coordinate relative to the upper edge of
the field area of the screen.
DESCRIPTOR ROW INCREMENT
Enter the row spacing between field descriptors.
DESCRIPTOR START COLUMN
Enter the start column to place the Descriptor of the first
field. This is a coordinate relative to the left side of the
field area of the screen.
DESCRIPTOR COLUMN INCREMENT
Enter the number of display columns between the start of
field descriptors.
FIELD START ROW
Enter the start row to place the Field Data of the first
field. This is a coordinate relative to the upper edge of
the field area of the screen.
FIELD ROW INCREMENT
Enter the row spacing between field data.
FIELD START COL
Enter the start column to place the Field Data of the first
field. This is a coordinate relative to the left side of the
field area of the screen.
FIELD COLUMN INCREMENT
Enter the number of display columns between the start of
field data.
NUMBER OF COLUMNS
Enter the number of columns for fields and descriptors. For
example, if this number is a 1 then all the fields will be
placed in a single aligned column and if this number is 2
then all the fields will be placed in two aligned columns.
PAGE ASSIGNMENT
Enter the Data-Entry display page to assign this group of
fields (1-99).
START FIELD # and END FIELD #
Enter the Starting and Ending field numbers that determine
the group of fields to reassign.
See Also:
EDIT
dc_editdb()