Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Artful Two for Clipper 5.0 - Norton Guide http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]

Syntax

     THE_USUAL( cAlias [, cFname [, nMax_lvls [, lScrsave ]]] )

Purpose

The heart and soul of Artful.Lib, this function provides a maintenance
window governing any one or more tables which are documented in the
dictionary. The window provides all the usual maintenance commands, as well
as hooks to add new commands, replace any default command with a custom
udf, or replace the menu completely.

Arguments

     cAlias -- alias of the table to use

     cFname -- if passed, filename to use, otherwise the application
               dictionary entry corresponding to cAlias

     nMax_lvls -- if passed, maximum zoom level allowed; defaults to 10

     lScrsave -- if passed, whether to restore the user's screen on exit;
                 defaults to .T.

Setup

Considerable setup is required to call this function successfully: cAlias
must be open (and its related tables should be open), the dictionary must
be valid, all listed functions must be linked in, including all your custom
udfs. Note that all udfs called by THE_USUAL() from the dictionary must be
declared EXTERNAL.

The setting of DICT->Id_char determines the names of the data screen
functions for a table:

     udf_scr -- display screen -- defined by user
     udf_key -- get key fields -- defined by user
     udf_fld -- get remaining fields -- defined by user
     udf_say -- display a record -- define by user

The following variables are determined by DICT settings:

     udf_init -- initialising function for THE_USUAL(), default "SET_TABLE"
     udf_add -- add routine -- default GET_STD2(1)
     udf_copy -- copy routine -- default GET_STD2(3)
     udf_edit -- edit routine -- default GET_STD2(0)
     browser -- browse routine -- default U_TBROWSE()
     udf_brow -- browse inner udf -- default nothing
     brow_exc -- browse exception handler -- default XB_UDF()
     udf_list -- reports menu, default U_LIST()
     udf_memo -- memo editing suite, default U_MEMO()
     udf_rpl -- replace routine -- default RPL()
     udf_search -- default search function, default U_SEARCH()
     udf_zoom -- default zoom function, default U_ZOOM()

     U_QUERY() is a hard-coded entry in SET_TABLE().

For a thorough discussion of THE_USUAL(), see the Starting the Engine
chapter and Appendix 1.

Example

     IF CHK_DICT( "AAI_DICT" )
         THE_USUAL( "CUSTOMER )
     ENDIF

Returns

.T. if successful, else .F.

Side Effects

This is the most complex function in Artful.Lib, and it provides a
myriad of ways to crash.

Artful Calls

INIT_QUERY, PUSH/POP_SCR, POP_MSG, IS_OPEN, DICTFIND, SET_RELAT, IS_LOOKUP,
GO_TO, SET_ORDER, SEEK_REL, PAD, CHECK_REL, STAT_LINE, GET/SET_KEYS,
MACRO, AEMPTY, U_SEARCH, U_BROWSE, U_QUERY, U_ZOOM, U_MEMO.

More than 40 other Artful functions are called indirectly.

Source File

AA_USUAL.PRG

See Also: TBROWSER() WSMART()

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson