Contributed works of Danny A. del Pilar
How to build menu like old ACHOICE function?
KPI (Key Performance Indicator) Dashboard
Return value from modal window (Record Picker)
Similar SCATTER / GATHER en HMG
How to build menu like old ACHOICE function?
KPI (Key Performance Indicator) Dashboard
Return value from modal window (Record Picker)
Similar SCATTER / GATHER en HMG
Displays a text-mode dialog box with a message.
Syntax
HB_Alert( <xMessage>, [<aOptions>], [<cColor>], [<nDelay>] ) --> nChoice
Arguments
<xMessage> : The message to display. May be any data type. Character string may be divided display lines by the semicolon
<aOptions> : An array with available response as character strings. Default is { “Ok” }.
<cColor> : A string as color codes. Default color is “W+/R”.
<nDelay> : Number of seconds to wait to user response before abort. Default value is 0, that wait forever.
Returns
A numeric value indicating the ordinal position within <aOption> selected by the user. Zero value means that user pressed escape key.
If <nDelay> is specified and this number of seconds has elapsed without a key press, the return value is 1.
Description
HB_Alert() displays a dialog box and lets the user select an option. The user can move a highlight bar using arrow keys or the TAB key. To select an option, the user can press ENTER, SPACE or the first letter of an option.
HB_Alert() is extended version of Alert() to support all variables types (not just strings) is passed as first parameter.
Example
// This example displays a message with two line : file name and 'not found' message. // After 15 seconds without user response, assumed 'Abort' selected. FUNCTION FNFMessage( cFileName ) LOCAL cMessage, aOptions, nChoice aMessage := { cFileName, 'Not found !' } aOptions := { 'Abort', 'Retry', 'Skip' } nChoice := HB_Alert( aMessage, aOptions, , 15 ) RETURN nChoice // FNFMessage()
Seealso
Declare a module request list
Syntax
REQUEST <name1> [,<nameN>]
Arguments
<idModule list> is the list of modules that will be linked into the current executable (.EXE) file.
Description
REQUEST is a declaration statement that defines a list of module identifiers to the linker. Like all other declaration statements, a REQUEST statement must be specified before any executable statements in either the program file, or a procedure or user-defined function definition.
During the compilation of Clipper source code, all explicit references to procedures and user-defined functions are made to the linker. In some instances, within a source file, there may be no references made to procedure or user-defined function names until runtime. REQUEST resolves this situation by forcing the named procedures or user-defined functions to be linked even if they are not explicitly referenced in the source file. This is important in several instances:
. Procedures, user-defined functions, or formats referenced with macro expressions or variables
. Procedures and user-defined functions used in REPORT and LABEL FORMs and not referenced in the source code
. User-defined functions used in index keys and not referenced in the source code
. ACHOICE(), DBEDIT(), or MEMOEDIT() user functions
. Initialization procedures declared with the INIT PROCEDURE statement
. Exit procedures declared with the EXIT PROCEDURE statement
To group common REQUESTs together, place them in a header file and then include (#include) the header file into each program file (.prg) that might indirectly use them.
Examples
. This example shows a typical header file consisting of common REQUESTs for REPORT FORMs: // Request.ch REQUEST HARDCR REQUEST TONE REQUEST MEMOTRAN REQUEST STRTRAN OR : REQUEST HARDCR, TONE, MEMOTRAN, STRTRAN
Seealso
ACHOICE(), ANNOUNCE, DBEDIT(), EXIT, PROCEDURE; EXTERNAL*