<CXP:BuildError/>

Compilation Error

Description: One or more errors occurred during the compilation of a resource required to build this page. Please review the following specific error details and modify your source code appropriately.

Files:

CXP File: C:\inetpub\wwwroot\webdoc-v2-standalone\v2\content\xppguide_h2_applications_in_character_mode_vio_mode.cxp
Intermediate Xbase++ Code: C:\inetpub\wwwroot\webdoc-v2-standalone\v2\content\cxp-application\xppguide_h2_applications_in_character_mode_vio_mode.cxp.20251014-20621771.dll

Message(s):

Compiler: error XBT0523: Length of input line exceeds input buffer length in Line 0
A single line of code which is broken down into several lines using the line continuation character (;) exceeds the limit of 20kB characters. This line must be split into several lines without line continuation, or blank spaces must be converted into tabs.

(No Source Code Location Determinable)

Build Process

The builder was invoked with the following parameters, the output is shown below.

Current Directory:
C:\Program Files (x86)\Alaska Software\cxp20\bin
Command:
C:\Program Files (x86)\Alaska Software\cxp20\bin\cxc-builder.exe
Parameters:
"@C:\inetpub\wwwroot\webdoc-v2-standalone\v2\content\cxp-application\xppguide_h2_applications_in_character_mode_vio_mode.cxp.20251014-20621771.lst"
Output:
c:\inetpub\wwwroot\webdoc-v2-standalone\v2\content\cxp-application\xppguide_h2_applications_in_character_mode_vio_mode.cxp.prg(0:0): error XBT0523: Length of input line exceeds input buffer length


Full Source

In the following the full source code of your resource is shown.

0001 <%#page implements="PageClass_025744357FA0A85FDE71C27F95133C90ECC59CBC" layout="/layouts/content-h2.layout" %>
0002
0003 @SECTION meta-title
0004 <title>Applications in character mode (VIO mode)</title>
0005
0006 @SECTION meta-description
0007 <meta name="description" content="This section describes the most important commands, functions, and dialog concepts used in programming VIO applications." />
0008
0009 @SECTION menu-sidebar
0010 <div id="sidebar-menu-placeholder"><div class="ui blue inverted left vertical menu sidebar mobile only" id="sidebar-menu">
0011    <div class="item" id="wdg-sidebar-left-menu">
0012     <div class="header" >xppguide</div>
0013     <div class="menu" >
0014      <a class="item"  href="xppguide_h1_user_interface_and_dialog_concepts.cxp">User Interface and Dialog Concepts</a><a class="item active"  href="xppguide_h2_applications_in_character_mode_vio_mode.cxp">Applications in character mode (VIO mode)</a><a class="item"  href="xppguide_h2_applications_in_graphics_mode_gui_mode.cxp">Applications in graphics mode (GUI mode)</a><a class="item"  href="xppguide_h2_creating_gui_applications.cxp">Creating GUI applications</a><a class="item"  href="xppguide_h2_touch_input.cxp">Touch input</a>
0015     </div>
0016    </div>
0017   </div>
0018 </div>
0019
0020 @SECTION top-header
0021 <div class="ui huge center aligned dividing header" id="top-level-header">
0022  <div class="content" id="wdg-top-level-title">
0023   <i class="compass icon" ></i>
0024 <span id="wdg-top-level-title-header">Programming Guide:xppguide</span>
0025  </div>
0026 </div>
0027
0028 @SECTION left-menu
0029 <div class="ui vertical accordion inverted orange fluid menu" id="wgd-left-menu">
0030  <a class="item" href="xppguide_h1_user_interface_and_dialog_concepts.cxp" id="wgd-left-menu-parent">
0031   <div class="header" id="wgd-left-menu-parent-header">User Interface and Dialog Concepts</div>
0032     </a>
0033 <a class="item active"  href="xppguide_h2_applications_in_character_mode_vio_mode.cxp">Applications in character mode (VIO mode)</a><a class="item"  href="xppguide_h2_applications_in_graphics_mode_gui_mode.cxp">Applications in graphics mode (GUI mode)</a><a class="item"  href="xppguide_h2_creating_gui_applications.cxp">Creating GUI applications</a><a class="item"  href="xppguide_h2_touch_input.cxp">Touch input</a>
0034 </div>
0035
0036 @SECTION breadcrumbs
0037 <a class="link item" href="bc_programming_guide.cxp" >
0038 <i class="compass icon" ></i>
0039 <span>Programming Guide</span>
0040 </a>
0041 <i class="right angle icon divider"></i>
0042 <a class="link item" href="bc_programming_guide.cxp" >
0043 <i class="compass icon" ></i>
0044 <span>xppguide</span>
0045 </a>
0046 <i class="right angle icon divider" ></i>
0047 <a class="link item" href="xppguide_h1_user_interface_and_dialog_concepts.cxp" >
0048 <i class="compass icon" ></i>
0049 <span>User Interface and Dialog Concepts</span>
0050   <!-- go to contentPageHeading1-->
0051 </a>
0052 <i class="right angle icon divider"></i>
0053 <span class="item" >
0054 <i class="compass icon" ></i>
0055 <span>Applications in character mode (VIO mode)</span>
0056 </span>
0057
0058 @SECTION name
0059 <span>Applications in character mode (VIO mode)</span>
0060
0061 @SECTION feature
0062 <a class="bg-blue ui tag label" href="/document-conventions.cxp#FeatureGrades" id="wdg-feature">Foundation</a>
0063
0064 @SECTION body
0065 <div id="wdg-central-column">
0066  <div id="wdg-segment">
0067   <div class="ui vertical basic segment">
0068    <div>
0069     <p>This section describes the most important commands, functions, and dialog concepts used in programming VIO applications. With only a few exceptions, all relevant language elements of Xbase++ are compatible with Clipper. Programmers familiar with Clipper can just read the &quot;Keyboard and mouse&quot; and &quot;The default Get system&quot; sections of this chapter. Note that the functionality of a VIO application is guaranteed in hybrid mode as well as in GUI mode. </p>
0070    </div>
0071   </div>
0072  </div>
0073  <div>
0074   <a  class="anchor" NAME="unformatted_input_and_output"></a>
0075   <div class="ui vertical basic segment">
0076    <div class="ui header" >Unformatted input and output</div>
0077    <div>
0078     <p>The simplest form of data input and output is unformatted. Data is input or output at the current position of the screen cursor or print head. Xbase++ provides a set of commands for unformatted input and output. These are listed in the following table: </p>
0079     <p><div class="ui vertical basic segment wdg-table-with-notes">
0080        <div class="ui small header wdg-table-header">Commands for unformatted input and output</div>
0081        <table class="ui stackable table wdg-table-table">
0082         <thead class="wdg-table-thead">
0083          <tr class="wdg-table-thead-tr">
0084           <th class="wdg-table-thead-th">Command</th>
0085           <th class="wdg-table-thead-th">Description</th>
0086          </tr>
0087         </thead>
0088         <tbody class="wdg-table-tbody">
0089          <tr class="wdg-table-tbody-tr">
0090           <td class="wdg-table-tbody-td">? | ??</td>
0091           <td class="wdg-table-tbody-td">Output the result of one or more expressions</td>
0092          </tr>
0093          <tr class="wdg-table-tbody-tr">
0094           <td class="wdg-table-tbody-td">ACCEPT</td>
0095           <td class="wdg-table-tbody-td">Input characters at the current cursor position</td>
0096          </tr>
0097          <tr class="wdg-table-tbody-tr">
0098           <td class="wdg-table-tbody-td">DISPLAY</td>
0099           <td class="wdg-table-tbody-td">Output the contents of a database file</td>
0100          </tr>
0101          <tr class="wdg-table-tbody-tr">
0102           <td class="wdg-table-tbody-td">INPUT</td>
0103           <td class="wdg-table-tbody-td">Input an expression at the current cursor position</td>
0104          </tr>
0105          <tr class="wdg-table-tbody-tr">
0106           <td class="wdg-table-tbody-td">LIST</td>
0107           <td class="wdg-table-tbody-td">Output the contents of a database file</td>
0108          </tr>
0109          <tr class="wdg-table-tbody-tr">
0110           <td class="wdg-table-tbody-td">SET ALTERNATE</td>
0111           <td class="wdg-table-tbody-td">Turn output to a file on or off</td>
0112          </tr>
0113          <tr class="wdg-table-tbody-tr">
0114           <td class="wdg-table-tbody-td">SET COLOR</td>
0115           <td class="wdg-table-tbody-td">Set the screen color</td>
0116          </tr>
0117          <tr class="wdg-table-tbody-tr">
0118           <td class="wdg-table-tbody-td">SET CONSOLE</td>
0119           <td class="wdg-table-tbody-td">Turn screen output on or off</td>
0120          </tr>
0121          <tr class="wdg-table-tbody-tr">
0122           <td class="wdg-table-tbody-td">SET PRINTER</td>
0123           <td class="wdg-table-tbody-td">Turn printer output on or off</td>
0124          </tr>
0125          <tr class="wdg-table-tbody-tr">
0126           <td class="wdg-table-tbody-td">TEXT...ENDTEXT</td>
0127           <td class="wdg-table-tbody-td">Output one or more lines of text</td>
0128          </tr>
0129          <tr class="wdg-table-tbody-tr">
0130           <td class="wdg-table-tbody-td">TYPE</td>
0131           <td class="wdg-table-tbody-td">Output the contents of any file</td>
0132          </tr>
0133          <tr class="wdg-table-tbody-tr">
0134           <td class="wdg-table-tbody-td">WAIT</td>
0135           <td class="wdg-table-tbody-td">Input a single character</td>
0136          </tr>
0137         </tbody>
0138        </table>
0139       </div></p>
0140     <p>The three commands ACCEPT, INPUT and WAIT provide unformatted input. WAIT accepts a single keystroke while ACCEPT and INPUT allow any number of characters to be entered. Input via ACCEPT and INPUT is ended when the user presses the Enter key. Characters entered using INPUT are considered as an expression and are compiled using the macro operator (an error in the expression leads to a runtime error). Characters entered using the ACCEPT command remain unchanged and can be assigned to a memory variable as a character string. </p>
0141     <p>The most commonly used commands for unformatted output are the single and the double question marks (? or ??). These are equivalent to the functions QOut() and QQOut(), respectively. The results of one or more expressions can be output using these commands. The default output device is the screen. The results of the expressions can also be saved in a file (after SET ALTERNATE ON) or sent to a printer (after SET PRINTER ON). If the command SET CONSOLE OFF is called before output, screen output is suppressed. After screen output has been suppressed, the screen output must be reactivated using SET CONSOLE ON after output to the file and/or printer is complete. </p>
0142     <p>The commands LIST and DISPLAY are both used to output records from a database file. The command TYPE outputs the contents of any text file. The options TO PRINTER and TO FILE are valid with all three of these commands, so simultaneous output to a printer or a file can be performed without calling SET PRINTER ON or SET ALTERNATE ON. The screen output of these commands can be suppressed by first calling SET CONSOLE OFF. </p>
0143     <p>The command SET COLOR changes the color for the display of screen output. The command is not really an output command, but allows the color of the output to be modified. </p>
0144     <p>Detailed descriptions of the commands for unformatted input and output, including program examples, are found in the reference documentation. </p>
0145    </div>
0146   </div>
0147  </div>
0148  <div>
0149   <a  class="anchor" NAME="formatted_input_and_output"></a>
0150   <div class="ui vertical basic segment">
0151    <div class="ui header" >Formatted input and output</div>
0152    <div>
0153     <p>Formatted input and output allows the exact position on the screen or printer (the row and column) for data input or output to be specified. Xbase++ includes commands and functions for formatted input and output. The commands are translated by the preprocessor to the equivalent function, which means that the difference between commands and functions is just a difference in syntax. The command syntax sometimes allow more readable program code, since many commands imply several function calls and the command syntax provides additional keywords. The following table lists the most important functions and commands for formatted input and output: </p>
0154     <p><div class="ui vertical basic segment wdg-table-with-notes">
0155        <div class="ui small header wdg-table-header">Commands and functions for formatted input and output</div>
0156        <table class="ui stackable table wdg-table-table">
0157         <thead class="wdg-table-thead">
0158          <tr class="wdg-table-thead-tr">
0159           <th class="wdg-table-thead-th">Command/function</th>
0160           <th class="wdg-table-thead-th">Description</th>
0161          </tr>
0162         </thead>
0163         <tbody class="wdg-table-tbody">
0164          <tr class="wdg-table-tbody-tr">
0165           <td class="wdg-table-tbody-td">&#64;</td>
0166           <td class="wdg-table-tbody-td">Position screen cursor and delete screen line</td>
0167          </tr>
0168          <tr class="wdg-table-tbody-tr">
0169           <td class="wdg-table-tbody-td">&#64;...BOX</td>
0170           <td class="wdg-table-tbody-td">Output box on the screen</td>
0171          </tr>
0172          <tr class="wdg-table-tbody-tr">
0173           <td class="wdg-table-tbody-td">&#64;...CLEAR</td>
0174           <td class="wdg-table-tbody-td">Delete screen area</td>
0175          </tr>
0176          <tr class="wdg-table-tbody-tr">
0177           <td class="wdg-table-tbody-td">&#64;...GET</td>
0178           <td class="wdg-table-tbody-td">Input data</td>
0179          </tr>
0180          <tr class="wdg-table-tbody-tr">
0181           <td class="wdg-table-tbody-td">&#64;...SAY</td>
0182           <td class="wdg-table-tbody-td">Output data</td>
0183          </tr>
0184          <tr class="wdg-table-tbody-tr">
0185           <td class="wdg-table-tbody-td">&#64;...TO</td>
0186           <td class="wdg-table-tbody-td">Output box on the screen</td>
0187          </tr>
0188          <tr class="wdg-table-tbody-tr">
0189           <td class="wdg-table-tbody-td">CLEAR</td>
0190           <td class="wdg-table-tbody-td">Delete entire screen</td>
0191          </tr>
0192          <tr class="wdg-table-tbody-tr">
0193           <td class="wdg-table-tbody-td">Col()</td>
0194           <td class="wdg-table-tbody-td">Return column position of screen cursor</td>
0195          </tr>
0196          <tr class="wdg-table-tbody-tr">
0197           <td class="wdg-table-tbody-td">DispOut()</td>
0198           <td class="wdg-table-tbody-td">Output the result of an expression, and update cursor position</td>
0199          </tr>
0200          <tr class="wdg-table-tbody-tr">
0201           <td class="wdg-table-tbody-td">DispOutAt()</td>
0202           <td class="wdg-table-tbody-td">Like DispOut() but cursor position not updated</td>
0203          </tr>
0204          <tr class="wdg-table-tbody-tr">
0205           <td class="wdg-table-tbody-td">DevOut()</td>
0206           <td class="wdg-table-tbody-td">Output expression results on the current output device</td>
0207          </tr>
0208          <tr class="wdg-table-tbody-tr">
0209           <td class="wdg-table-tbody-td">Row()</td>
0210           <td class="wdg-table-tbody-td">Return row position of screen cursor</td>
0211          </tr>
0212          <tr class="wdg-table-tbody-tr">
0213           <td class="wdg-table-tbody-td">MaxCol()</td>
0214           <td class="wdg-table-tbody-td">Return maximum number of columns on the screen</td>
0215          </tr>
0216          <tr class="wdg-table-tbody-tr">
0217           <td class="wdg-table-tbody-td">MaxRow()</td>
0218           <td class="wdg-table-tbody-td">Return maximum number of rows on the screen</td>
0219          </tr>
0220          <tr class="wdg-table-tbody-tr">
0221           <td class="wdg-table-tbody-td">PCol()</td>
0222           <td class="wdg-table-tbody-td">Return current column position of the print head</td>
0223          </tr>
0224          <tr class="wdg-table-tbody-tr">
0225           <td class="wdg-table-tbody-td">PRow()</td>
0226           <td class="wdg-table-tbody-td">Return current row position of the print head</td>
0227          </tr>
0228          <tr class="wdg-table-tbody-tr">
0229           <td class="wdg-table-tbody-td">SaveScreen()</td>
0230           <td class="wdg-table-tbody-td">Save screen area</td>
0231          </tr>
0232          <tr class="wdg-table-tbody-tr">
0233           <td class="wdg-table-tbody-td">SET DEVICE</td>
0234           <td class="wdg-table-tbody-td">Specify current output device</td>
0235          </tr>
0236          <tr class="wdg-table-tbody-tr">
0237           <td class="wdg-table-tbody-td">SetColor()</td>
0238           <td class="wdg-table-tbody-td">Set or return screen color</td>
0239          </tr>
0240          <tr class="wdg-table-tbody-tr">
0241           <td class="wdg-table-tbody-td">SetPos()</td>
0242           <td class="wdg-table-tbody-td">Change screen cursor position</td>
0243          </tr>
0244          <tr class="wdg-table-tbody-tr">
0245           <td class="wdg-table-tbody-td">SetPrc()</td>
0246           <td class="wdg-table-tbody-td">Set row and column coordinates of the print head</td>
0247          </tr>
0248          <tr class="wdg-table-tbody-tr">
0249           <td class="wdg-table-tbody-td">RestScreen()</td>
0250           <td class="wdg-table-tbody-td">Redisplay a saved screen area</td>
0251          </tr>
0252         </tbody>
0253        </table>
0254       </div></p>
0255     <p>Some of these functions and commands affect only the position of the screen cursor but are included because the cursor coordinates mark the position where data is displayed. Other functions and commands manage the screen itself. In VIO mode, the origin (0, 0) of the coordinate system is the upper left corner of the screen or window. The lower right corner (MaxRow(), MaxCol()) represents the largest coordinate values that are visible.  The position of the cursor is set by specifying the Row() and Col() to either the command &#64; or the function SetPos(). The screen is generally cleared using CLEAR at the start of each program prior to displaying anything for the first time.  The commands &#64;...BOX and &#64;...TO draw boxes on the screen. They are only valid for the screen and are not available for the printer. </p>
0256     <p>The most important command for formatted output is &#64;...SAY which outputs the result of an expression. Output using &#64;...SAY can occur on the screen or on the printer. Formatted output differs from unformatted output in that simultaneous output on the screen and printer is not possible. Selecting an output device is done using the command SET DEVICE (TO PRINTER or TO SCREEN). Output on the printer is at the current position of the print head which can be set using the functions PRow() and PCol(). The function SetPrc() resets the internal values for the row and column coordinates of the print head but does not reposition the print head. </p>
0257     <p>The command &#64;...SAY can be expanded to include data input using the GET option. Alternatively, an input field can be defined using the command &#64;...GET. These commands are used to define one or more data entry fields prior to the actual data input which occurs within the READ command or the function ReadModal(). READ and ReadModal() both activate the default Get system of Xbase++ (see the later section on this). </p>
0258    </div>
0259   </div>
0260  </div>
0261  <div>
0262   <a  class="anchor" NAME="keyboard_and_mouse"></a>
0263   <div class="ui vertical basic segment">
0264    <div class="ui header" >Keyboard and mouse</div>
0265    <div>
0266     <p>Under an operating system with graphic user interface, the mouse (not the keyboard) is the most important input device for controlling the application. Because of this, running programs or individual modules is not controlled by program logic but by &quot;events&quot;. These events are usually caused by actions of the user. Events, which come from outside the application, are temporarily stored by the operating system in an event queue and then sequentially processed by the application. Some examples of events would be: the mouse was moved, the right mouse button was clicked, the left mouse button was double clicked, etc. A keypress is also an event, which shows that events can come from various devices. </p>
0267     <p>Each event is identified within the program by a numeric code. Each key has an associated unique numeric value and different mouse events have different numeric codes. In Xbase++, events are all handled by a group of event functions, regardless of their origin. There is also a group of functions and commands which assure language compatibility with Clipper. These compatibility functions and commands can only respond to the keyboard and they only consider the keyboard codes defined in Clipper. It should be noted that the numeric values associated with the various keys in Clipper do not necessarily match the event codes of the operating system or Xbase++ and the old keycodes are offered only for compatibility. A correlation is found between key codes and ASCII characters only in the range of 0 to 255. These compatibility functions and commands only consider the key codes defined in Clipper. The distinction between &quot;event functions&quot; and &quot;keyboard functions and commands&quot; is also shown in the following tables: </p>
0268     <p><div class="ui vertical basic segment wdg-table-with-notes">
0269        <div class="ui small header wdg-table-header">Event functions supporting both keyboard and mouse input</div>
0270        <table class="ui stackable table wdg-table-table">
0271         <thead class="wdg-table-thead">
0272          <tr class="wdg-table-thead-tr">
0273           <th class="wdg-table-thead-th">Function</th>
0274           <th class="wdg-table-thead-th">Description</th>
0275          </tr>
0276         </thead>
0277         <tbody class="wdg-table-tbody">
0278          <tr class="wdg-table-tbody-tr">
0279           <td class="wdg-table-tbody-td">AppEvent()</td>
0280           <td class="wdg-table-tbody-td">Read event and remove it from the queue</td>
0281          </tr>
0282          <tr class="wdg-table-tbody-tr">
0283           <td class="wdg-table-tbody-td">LastAppEvent()</td>
0284           <td class="wdg-table-tbody-td">Return the last event</td>
0285          </tr>
0286          <tr class="wdg-table-tbody-tr">
0287           <td class="wdg-table-tbody-td">NextAppEvent()</td>
0288           <td class="wdg-table-tbody-td">Read next event without removing it from queue</td>
0289          </tr>
0290          <tr class="wdg-table-tbody-tr">
0291           <td class="wdg-table-tbody-td">PostAppEvent()</td>
0292           <td class="wdg-table-tbody-td">Put event into the queue</td>
0293          </tr>
0294          <tr class="wdg-table-tbody-tr">
0295           <td class="wdg-table-tbody-td">SetAppEvent()</td>
0296           <td class="wdg-table-tbody-td">Associate event with a code block</td>
0297          </tr>
0298          <tr class="wdg-table-tbody-tr">
0299           <td class="wdg-table-tbody-td">SetMouse()</td>
0300           <td class="wdg-table-tbody-td">Toggle availability of mouse events on or off</td>
0301          </tr>
0302         </tbody>
0303        </table>
0304       </div></p>
0305     <p><div class="ui vertical basic segment wdg-table-with-notes">
0306        <div class="ui small header wdg-table-header">Keyboard functions and commands supporting only keyboard input</div>
0307        <table class="ui stackable table wdg-table-table">
0308         <thead class="wdg-table-thead">
0309          <tr class="wdg-table-thead-tr">
0310           <th class="wdg-table-thead-th">Function / Command</th>
0311           <th class="wdg-table-thead-th">Description</th>
0312          </tr>
0313         </thead>
0314         <tbody class="wdg-table-tbody">
0315          <tr class="wdg-table-tbody-tr">
0316           <td class="wdg-table-tbody-td">Inkey()</td>
0317           <td class="wdg-table-tbody-td">Read key code</td>
0318          </tr>
0319          <tr class="wdg-table-tbody-tr">
0320           <td class="wdg-table-tbody-td">KEYBOARD</td>
0321           <td class="wdg-table-tbody-td">Write characters into keyboard buffer</td>
0322          </tr>
0323          <tr class="wdg-table-tbody-tr">
0324           <td class="wdg-table-tbody-td">LastKey()</td>
0325           <td class="wdg-table-tbody-td">Return last key code</td>
0326          </tr>
0327          <tr class="wdg-table-tbody-tr">
0328           <td class="wdg-table-tbody-td">NextKey()</td>
0329           <td class="wdg-table-tbody-td">Read next key code</td>
0330          </tr>
0331          <tr class="wdg-table-tbody-tr">
0332           <td class="wdg-table-tbody-td">SetKey()</td>
0333           <td class="wdg-table-tbody-td">Associate key code with a code block</td>
0334          </tr>
0335         </tbody>
0336        </table>
0337       </div></p>
0338     <p>A detailed description of the compatibility functions can be found in the reference documentation. </p>
0339     <p>AppEvent() reads events from the queue and also removes them from the queue. The return value of AppEvent() is the numeric code that uniquely identifies the event. The function SetMouse(.T.) must have been previously called for the AppEvent() function to register mouse events in VIO mode. The following program example is terminated when the right mouse button is pressed: </p>
0340     <p><figure class="code-block-segment" >
0341        <div class="code-block">
0342         <pre><code  class="language-xpp">#include &quot;Appevent.ch&quot; 
0343
0344 PROCEDURE Main 
0345    LOCAL nEvent := 0 
0346
0347    CLEAR 
0348    &#64; 0,0 SAY &quot;Press right mouse button to terminate&quot; 
0349    SetMouse(.T.)                       // register mouse events 
0350
0351    DO WHILE nEvent &lt;&gt; xbeM_RbDown      // event: right mouse button 
0352       nEvent := AppEvent(,,,0)         // wait until event occurs 
0353
0354       IF nEvent &lt; xbeB_Event           // event: keypress 
0355          ? &quot;The event code for the key is:&quot;, nEvent 
0356       ELSE 
0357          ? &quot;The event code for the mouse is:&quot; , nEvent 
0358       ENDIF 
0359    ENDDO 
0360
0361 RETURN 
0362 </code></pre>
0363        </div>
0364       </figure></p>
0365     <p>The large number of possible events makes it impractical to directly program events using the numeric codes. Instead, the constants defined in the #include file APPEVENT.CH should be used. These constants all begin with the prefix xbe (which stands for <span class="bold">xb</span>ase <span class="bold">e</span>vent) followed by an uppercase letter or an underscore. The uppercase letter identifies the category for the event and the underscore separates the prefix from the rest of the descriptive event name: </p>
0366     <p><div class="ui vertical basic segment wdg-table-with-notes">
0367        <div class="ui small header wdg-table-header">Event categories</div>
0368        <table class="ui stackable table wdg-table-table">
0369         <thead class="wdg-table-thead">
0370          <tr class="wdg-table-thead-tr">
0371           <th class="wdg-table-thead-th">Category</th>
0372           <th class="wdg-table-thead-th">Prefix</th>
0373           <th class="wdg-table-thead-th">Example</th>
0374          </tr>
0375         </thead>
0376         <tbody class="wdg-table-tbody">
0377          <tr class="wdg-table-tbody-tr">
0378           <td class="wdg-table-tbody-td">No event</td>
0379           <td class="wdg-table-tbody-td">xbe_</td>
0380           <td class="wdg-table-tbody-td">xbe_None</td>
0381          </tr>
0382          <tr class="wdg-table-tbody-tr">
0383           <td class="wdg-table-tbody-td">Keyboard event</td>
0384           <td class="wdg-table-tbody-td">xbeK_</td>
0385           <td class="wdg-table-tbody-td">xbeK_RETURN</td>
0386          </tr>
0387          <tr class="wdg-table-tbody-tr">
0388           <td class="wdg-table-tbody-td">Base event</td>
0389           <td class="wdg-table-tbody-td">xbeB_</td>
0390           <td class="wdg-table-tbody-td">xbeB_Event</td>
0391          </tr>
0392          <tr class="wdg-table-tbody-tr">
0393           <td class="wdg-table-tbody-td">Mouse event</td>
0394           <td class="wdg-table-tbody-td">xbeM_</td>
0395           <td class="wdg-table-tbody-td">xbeM_LbDown</td>
0396          </tr>
0397          <tr class="wdg-table-tbody-tr">
0398           <td class="wdg-table-tbody-td">Xbase Part event</td>
0399           <td class="wdg-table-tbody-td">xbeP_</td>
0400           <td class="wdg-table-tbody-td">xbeP_Activate</td>
0401          </tr>
0402         </tbody>
0403        </table>
0404       </div></p>
0405     <p>In addition to the return value identifying the event, the function AppEvent() modifies two parameters that are passed by reference. These are called &quot;message parameters&quot; and contain additional information about the event. In an event driven system such as Xbase++, it is often insufficient to receive only a single event code. For example, it is generally necessary to know the position of the mouse pointer if the event is &quot;mouse click&quot;. When the function AppEvent() is called, two parameters must be passed by reference to contain additional information about the event after AppEvent() returns. If the event is a mouse click, the coordinates of the mouse pointer are contained in the first message parameter as an array of two elements. The following example illustrates this: </p>
0406     <p><figure class="code-block-segment" >
0407        <div class="code-block">
0408         <pre><code  class="language-xpp">#include &quot;Appevent.ch&quot; 
0409
0410 PROCEDURE Main 
0411    LOCAL nEvent := 0, mp1, nRow, nCol 
0412
0413    CLEAR 
0414    &#64; 0,0 SAY &quot;Press right mouse button to cancel&quot; 
0415    SetMouse(.T.)                       // register mouse event 
0416
0417    DO WHILE nEvent &lt;&gt; xbeM_RbDown      // event: right mouse button 
0418       nEvent := AppEvent(&#64;mp1,,,0)     // wait until event 
0419                                        // occurs 
0420       IF nEvent &lt; xbeB_Event           // event: keypress 
0421          ? &quot;Event code:&quot;, nEvent 
0422       ELSEIF nEvent &lt;&gt; xbeM_Motion     // mouse events exept 
0423                                        // mouse moved 
0424          nRow := mp1[1]                // mouse coordinates 
0425          nCol := mp1[2] 
0426          &#64; nRow, nCol SAY &quot;The event code is:&quot; + Str(nEvent) 
0427       ENDIF 
0428    ENDDO 
0429
0430 RETURN 
0431 </code></pre>
0432        </div>
0433       </figure></p>
0434     <p>The variable <span class="italic">mp1</span> is passed by reference to the function AppEvent(). After each mouse event it contains the row and column coordinates of the mouse pointer in an array of two elements. In the example, the contents of the array are assigned to the two variables <span class="italic">nRow</span> and <span class="italic">nCol</span>. The event code is output at this position, unless it is a mouse movement. The xbeM_Motion event occurs very frequently during mouse movement and would clutter the screen if displayed. </p>
0435     <p>In VIO mode, the mouse coordinates are the most important information contained in the message parameters. In many other cases the parameters contain the value NIL in this operating mode but contain additional information when Xbase Parts are used (of course, Xbase Parts are not available in VIO mode) or when user-defined events are created using the function PostAppEvent(). The following example illustrates the basic relationship between the functions AppEvent() and PostAppEvent() which (along with their message parameters) create the basis for event driven programming: </p>
0436     <p><figure class="code-block-segment" >
0437        <div class="code-block">
0438         <pre><code  class="language-xpp">#include &quot;Appevent.ch&quot; 
0439
0440 #define  xbeU_DrawBox  xbeP_User + 1   // xbeP_User is the base value 
0441 #define  xbeU_Quit     xbeP_User + 2   // for User events 
0442
0443 PROCEDURE Main 
0444    LOCAL nEvent := 0, mp1, mp2 
0445
0446    CLEAR 
0447    &#64; 0,0 SAY &quot; Draw Box |  QUIT&quot;       // mouse sensitive region 
0448    SetMouse(.T.)                       // register mouse 
0449
0450    DO WHILE .T.                        // infinite event loop 
0451       nEvent := AppEvent( &#64;mp1, &#64;mp2 ,,0 ) 
0452
0453       DO CASE 
0454       CASE nEvent == xbeU_DrawBox      // user event 
0455          DrawBox( mp1, mp2 )           // mp1 = Date(), mp2 = Time() 
0456                                        // from PostAppEvent() 
0457       CASE nEvent == xbeU_Quit         // second user event 
0458          QUIT 
0459
0460       CASE nEvent &lt; xbeB_Event         // key was pressed 
0461          &#64; MaxRow(), 0 
0462          ?? &quot;Key code is:&quot;, nEvent 
0463
0464       CASE nEvent == xbeM_LbClick      // left mouse button click 
0465          &#64; MaxRow(), 0 
0466          ?? &quot;Coordinates are:&quot;, mp1[1], mp1[2] 
0467
0468          IF mp1[1]== 0 .AND. mp1[2] &lt;= 21 // in mouse sensitive 
0469                                           // region 
0470             IF mp1[2] &lt;= 15 
0471                PostAppEvent( xbeU_DrawBox, Date(), Time() ) 
0472             ELSE 
0473                PostAppEvent( xbeU_Quit ) 
0474             ENDIF 
0475          ELSE 
0476             &#64; mp1[1], mp1[2] SAY &quot;No selection made&quot; 
0477          ENDIF 
0478
0479       ENDCASE 
0480    ENDDO 
0481
0482 RETURN 
0483
0484 *********************************      // define position and display 
0485 PROCEDURE DrawBox( dDate, cTime )      // box using mouse clicks 
0486    LOCAL nEvent := 0, mp1, nTop, nLeft, nBottom, nRight 
0487
0488    SAVE SCREEN 
0489    &#64; 0, 0 SAY &quot;Click on upper left corner of box&quot; 
0490
0491    DO WHILE nEvent &lt;&gt; xbeM_LbClick     // wait for left mouse click 
0492       nEvent := AppEvent( &#64;mp1,,, 0 ) 
0493    ENDDO 
0494
0495    nTop  := mp1[1] 
0496    nLeft := mp1[2] 
0497
0498    nEvent := 0 
0499    &#64; nTop, nLeft SAY &quot;Click on lower right corner of box&quot; 
0500
0501    DO WHILE nEvent &lt;&gt; xbeM_LbClick     // wait for left mouse click 
0502       nEvent := AppEvent( &#64;mp1,,, 0 ) 
0503
0504       IF nEvent == xbeM_LbClick .AND. ; 
0505          ( mp1[1] &lt;= nTop .OR. mp1[2] &lt;= nLeft ) 
0506          Tone(1000,1)                  // lower right corner 
0507          nEvent := 0                   // is invalid 
0508       ENDIF 
0509    ENDDO 
0510
0511    nBottom  := mp1[1] 
0512    nRight   := mp1[2] 
0513
0514    RESTORE SCREEN 
0515    &#64; nTop, nLeft TO nBottom, nRight    // output box 
0516
0517    &#64; nTop+1,nLeft+1 SAY &quot;Date:&quot;        // display values of 
0518    ?? dDate                            // PostAppEvent() 
0519    &#64; nTop+2,nLeft+1 SAY &quot; Time:&quot; 
0520    ?? cTime 
0521
0522 RETURN 
0523 </code></pre>
0524        </div>
0525       </figure></p>
0526     <p>In the example, one of the two user-defined events is generated when the mouse is clicked in the hot spot region of the first screen row. The mouse coordinates (contained in the message parameter <span class="italic">mp1</span>) are used to distinguish whether the xbeU_DrawBox event or the xbeU_Quit event is placed in the queue by PostAppEvent(). The user-defined event xbeU_DrawBox receives the return values of Date() and Time() as message parameters. When this event is retrieved from the queue by AppEvent(), the message parameters are placed in the variables <span class="italic">mp1</span> and <span class="italic">mp2</span>. These values are passed to the procedure <span class="italic">DrawBox()</span> and displayed on the screen by this function. </p>
0527     <p>The program is a simple example showing the logic of event driven programming. Events are identified by a unique numeric value (using a #define constant) and additional information about the event is contained in the two message parameters. The values contained in the two parameters <span class="italic">mp1</span> and <span class="italic">mp2</span> vary depending on the event. The message parameter values can range from NIL in the simplest case to complex data structures such as arrays or objects. PostAppEvent() can be used to place any event in the queue that can then be retrieved from any place in the program using AppEvent(). </p>
0528    </div>
0529   </div>
0530  </div>
0531  <div>
0532   <a  class="anchor" NAME="the_default_get_system"></a>
0533   <div class="ui vertical basic segment">
0534    <div class="ui header" >The default Get system</div>
0535    <div>
0536     <p>Xbase++ provides a Get system for formatted data input in VIO mode. The source code of this system is contained in the GETSYS.PRG file. The open architecture of the Get system offers tremendous possibilities such as data validation before, during and after data entry. It also offers a specific place where a programmer can identify and process events that occur during data input without having to change the basic language elements for defining input fields. </p>
0537     <p>An input field is most easily created using the command &#64;...SAY...GET. The data entry itself is started using the command READ: </p>
0538     <p><figure class="code-block-segment" >
0539        <div class="code-block">
0540         <pre><code  class="language-xpp">USE Address ALIAS Addr 
0541
0542 &#64; 10,10 SAY &quot;First Name:&quot; GET Addr-&gt;FIRSTNAME  // define data 
0543 &#64; 12,10 SAY &quot; Last Name:&quot; GET Addr-&gt;LASTNAME   // entry fields 
0544
0545 READ                                           // read input 
0546 </code></pre>
0547        </div>
0548       </figure></p>
0549     <p>In these four lines a database file is opened, two data entry fields are defined and input is performed via the READ command. Input is terminated when the entry in the second field is finished using the Return key or if the Esc key is pressed during input. </p>
0550     <p>The command syntax is the easiest way to program data entry fields. This syntax is translated by the preprocessor into code that creates Get objects and stores them in the <span class="italic">GetList</span> array. Get objects include methods that allow the formatted display of values and interactive data entry. The data entry values can be contained in memory variables or in field variables. Access to the contents of data entry variables does not occur directly, but through a code block. This code block is called the data code block. The data code block is used by the Get object to read the value of a variable into the Get objects edit buffer and then to write the modified value back into the variable. </p>
0551     <p>When a Get object has input focus, the user can modify the contents of the edit buffer. A Get object uses various methods to control cursor navigation and transfer characters into the edit buffer. Get objects can also perform data validation before and after data input. Rules for data validation are specified in code blocks contained in instance variables of the Get object. </p>
0552     <p>The command &#64;...GET creates a Get object that already contain a code block to access the specified variable. When Get objects are created directly using the class method <span class="italic">Get():new()</span>, a data code block must be specified. Get objects are stored in an array that is passed to the function ReadModal(). If the &#64;...GET command is used, the array referencing the Get objects is contained in the variable <span class="italic">GetList</span>. The READ command passes the GetList array to the function ReadModal(). The ReadModal() function is the default edit routine which accesses various edit and display methods of the Get objects. The default Xbase++ Get system includes the ReadModal() function along with the other globally visible utility routines listed in the following table: </p>
0553    </div>
0554   </div>
0555  </div>
0556  <div>
0557   <a  class="anchor" NAME="functions_of_the_get_system"></a>
0558   <div class="ui vertical basic segment">
0559    <div class="ui header" >Functions of the Get system</div>
0560    <div>
0561     <p><div class="ui vertical basic segment wdg-table-with-notes">
0562        <div class="ui small header wdg-table-header">READ Service routines</div>
0563        <table class="ui stackable table wdg-table-table">
0564         <thead class="wdg-table-thead">
0565          <tr class="wdg-table-thead-tr">
0566           <th class="wdg-table-thead-th">Function</th>
0567           <th class="wdg-table-thead-th">Description</th>
0568          </tr>
0569         </thead>
0570         <tbody class="wdg-table-tbody">
0571          <tr class="wdg-table-tbody-tr">
0572           <td class="wdg-table-tbody-td">ReadModal()</td>
0573           <td class="wdg-table-tbody-td">Activates data input for all Get objects</td>
0574          </tr>
0575          <tr class="wdg-table-tbody-tr">
0576           <td class="wdg-table-tbody-td">ReadExit()</td>
0577           <td class="wdg-table-tbody-td">Defines termination keys for data entry fields</td>
0578          </tr>
0579          <tr class="wdg-table-tbody-tr">
0580           <td class="wdg-table-tbody-td">ReadInsert()</td>
0581           <td class="wdg-table-tbody-td">Toggles between insert and overwrite mode</td>
0582          </tr>
0583          <tr class="wdg-table-tbody-tr">
0584           <td class="wdg-table-tbody-td">ReadKill()</td>
0585           <td class="wdg-table-tbody-td">Terminates data input for all Get objects in the current GetList array</td>
0586          </tr>
0587         </tbody>
0588        </table>
0589       </div></p>
0590     <p><div class="ui vertical basic segment wdg-table-with-notes">
0591        <div class="ui small header wdg-table-header">GET Service routines</div>
0592        <table class="ui stackable table wdg-table-table">
0593         <thead class="wdg-table-thead">
0594          <tr class="wdg-table-thead-tr">
0595           <th class="wdg-table-thead-th">Function</th>
0596           <th class="wdg-table-thead-th">Description</th>
0597          </tr>
0598         </thead>
0599         <tbody class="wdg-table-tbody">
0600          <tr class="wdg-table-tbody-tr">
0601           <td class="wdg-table-tbody-td">GetEventReader()</td>
0602           <td class="wdg-table-tbody-td">Get Reader for AppEvent()</td>
0603          </tr>
0604          <tr class="wdg-table-tbody-tr">
0605           <td class="wdg-table-tbody-td">GetHandleEvent()</td>
0606           <td class="wdg-table-tbody-td">Allows event processing by current Get object</td>
0607          </tr>
0608          <tr class="wdg-table-tbody-tr">
0609           <td class="wdg-table-tbody-td">GetPrevalidate()</td>
0610           <td class="wdg-table-tbody-td">Prevalidates before a Get object receives focus</td>
0611          </tr>
0612          <tr class="wdg-table-tbody-tr">
0613           <td class="wdg-table-tbody-td">GetPostvalidate()</td>
0614           <td class="wdg-table-tbody-td">Postvalidates before a Get object loses focus</td>
0615          </tr>
0616          <tr class="wdg-table-tbody-tr">
0617           <td class="wdg-table-tbody-td">GetDoSetkey()</td>
0618           <td class="wdg-table-tbody-td">Executes code block which is linked to a key or an event</td>
0619          </tr>
0620          <tr class="wdg-table-tbody-tr">
0621           <td class="wdg-table-tbody-td">GetActive()</td>
0622           <td class="wdg-table-tbody-td">Sets the Get object that has the focus</td>
0623          </tr>
0624          <tr class="wdg-table-tbody-tr">
0625           <td class="wdg-table-tbody-td">GetKillActive()</td>
0626           <td class="wdg-table-tbody-td">Removes focus from the active Get object</td>
0627          </tr>
0628          <tr class="wdg-table-tbody-tr">
0629           <td class="wdg-table-tbody-td">Getlist()</td>
0630           <td class="wdg-table-tbody-td">Determines current GetList array</td>
0631          </tr>
0632          <tr class="wdg-table-tbody-tr">
0633           <td class="wdg-table-tbody-td">GetlistPos()</td>
0634           <td class="wdg-table-tbody-td">Returns position of current Get object in the GetList array</td>
0635          </tr>
0636          <tr class="wdg-table-tbody-tr">
0637           <td class="wdg-table-tbody-td">GetEnableEvents()</td>
0638           <td class="wdg-table-tbody-td">Toggles between Inkey() and AppEvent()</td>
0639          </tr>
0640          <tr class="wdg-table-tbody-tr">
0641           <td class="wdg-table-tbody-td">GetToMousePos()</td>
0642           <td class="wdg-table-tbody-td">Positions cursor in entry field at the mouse pointer</td>
0643          </tr>
0644         </tbody>
0645        </table>
0646       </div></p>
0647     <p><div class="ui vertical basic segment wdg-table-with-notes">
0648        <div class="ui small header wdg-table-header">Compatibility functions supporting only keyboard entry</div>
0649        <table class="ui stackable table wdg-table-table">
0650         <thead class="wdg-table-thead">
0651          <tr class="wdg-table-thead-tr">
0652           <th class="wdg-table-thead-th">Function</th>
0653           <th class="wdg-table-thead-th">Description</th>
0654          </tr>
0655         </thead>
0656         <tbody class="wdg-table-tbody">
0657          <tr class="wdg-table-tbody-tr">
0658           <td class="wdg-table-tbody-td">GetReader()</td>
0659           <td class="wdg-table-tbody-td">Get reader for Inkey()</td>
0660          </tr>
0661          <tr class="wdg-table-tbody-tr">
0662           <td class="wdg-table-tbody-td">GetApplykey()</td>
0663           <td class="wdg-table-tbody-td">Allows keys to be processed by the current Get object</td>
0664          </tr>
0665         </tbody>
0666        </table>
0667       </div></p>
0668     <p>Two of the functions in the GETSYS.PRG file exist in order to ensure compatibility with the Clipper Get system. In these functions, the compatibility function Inkey() is used to retrieve keyboard entry. This is not compatible with the AppEvent() function which is used to read Xbase++ events. To make it easier to port existing Clipper applications to Xbase++, the compatibility functions are used by default in VIO mode. This means that the Get system reads only the keyboard using Inkey() and does not process any events. In this default mode, the Get system is completely compatible with Clipper but the mouse is not available. </p>
0669     <p>The default setting is switched when SetMouse(.T.) is called before the first READ command or the first call to ReadModal(). Events in the Get system are then processed using the functions GetEventReader() and GetHandleEvent() instead of the functions GetReader() and GetApplykey(). In this setting the mouse is available. The function SetAppEvent() must be used instead of SetKey() to associate keystrokes with code blocks. The function GetEnableEvents( .T. | .F.) can also be used to switch between the compatibility mode and the event driven mode of the Xbase++ Get system. </p>
0670     <p>The service functions of the Get system are rarely needed. The &#64;...SAY...GET command is sufficient to allow complex data entry screens to be easily programmed. A detailed knowledge of the additional Get system functions is required when the default Get system is modified to meet unique requirements. </p>
0671    </div>
0672   </div>
0673  </div>
0674  <div>
0675   <a  class="anchor" NAME="modification_of_the_get_system"></a>
0676   <div class="ui vertical basic segment">
0677    <div class="ui header" >Modification of the Get system</div>
0678    <div>
0679     <p>The source code of the Xbase++ Get system is contained in the file GETSYS.PRG and can be modified in just about any way. Changes should not be performed in the file itself but in a copy of the file. Before substantial changes to GETSYS.PRG are performed, other ways to modify the default behavior to meet individual requirements should be explored. For example, the instance variable <span class="italic">oGet:reader</span> contains a code block that calls a user-defined Get reader that can be used to provide special features. The Get reader code block must accept one parameter (the Get object) which must be passed as the first parameter to the function or procedure that implements the Get reader. The basic approach to implementing a special Get reader is shown in the following example. This code uses the compatibility function Inkey() to read keyboard input. The purpose of the example reader is to handle German language umlauts and &quot;&szlig;&quot; entered as characters in the entry field. These characters are translated into their two character equivalents in the user-defined reader <span class="italic">NoUmlauts()</span> : </p>
0680     <p><figure class="code-block-segment" >
0681        <div class="code-block">
0682         <pre><code  class="language-xpp">#include &quot;Get.ch&quot; 
0683
0684 ************** 
0685 PROCEDURE Main 
0686    LOCAL cName1 := Space(20),  cName2 := Space(20) 
0687
0688    &#64;  8,10 SAY &quot;Input without umlauts and &szlig;&quot; 
0689
0690    &#64; 10,10 SAY &quot;First Name:&quot; GET cName1 ;    // define Get Reader 
0691                           SEND reader := {|oGet| NoUmlauts(oGet) } 
0692    &#64; 12,10 SAY &quot; Last Name:&quot; GET cName2 ; 
0693                           SEND reader := {|oGet| NoUmlauts(oGet) } 
0694    READ 
0695
0696 RETURN 
0697 </code></pre>
0698        </div>
0699       </figure></p>
0700     <p>The definition of these input fields occurred using the command syntax. The code block which assigns the user-defined Get reader is specified using the SEND option. In it the reader code block is assigned to the instance variable <span class="italic">oGet:reader</span>. The Get reader itself is programmed in the following procedure: </p>
0701     <p><figure class="code-block-segment" >
0702        <div class="code-block">
0703         <pre><code  class="language-xpp">*************************** 
0704 PROCEDURE NoUmlauts( oGet ) 
0705    LOCAL bBlock, cChar, nKey 
0706
0707    IF GetPreValidate( oGet )           // perform prevalidation 
0708       oGet:setFocus()                  // set input focus to Get 
0709
0710       bBlock := {|o,n1,n2| ;           // translate within the code 
0711          GetApplykey(o,n1),;           // block into two characters 
0712          IIf( o:typeOut, NIL, GetApplykey(o,n2) ) } 
0713
0714       DO WHILE oGet:exitState == GE_NOEXIT 
0715
0716          IF oGet:typeOut               // no editable characters 
0717             oGet:exitState := GE_ENTER // right of the cursor 
0718          ENDIF 
0719
0720          DO WHILE oGet:exitState == GE_NOEXIT 
0721             nKey := Inkey(0)           // read keyboard 
0722             cChar:= Chr(nKey) 
0723
0724             DO CASE                  // translate special characters 
0725             CASE cChar == &quot;&Auml;&quot; 
0726                Eval( bBlock, oGet, Asc(&quot;A&quot;), Asc(&quot;e&quot;) ) 
0727             CASE cChar == &quot;&Ouml;&quot; 
0728                Eval( bBlock, oGet, Asc(&quot;O&quot;), Asc(&quot;e&quot;) ) 
0729             CASE cChar == &quot;&Uuml;&quot; 
0730                Eval( bBlock, oGet, Asc(&quot;U&quot;), Asc(&quot;e&quot;) ) 
0731             CASE cChar == &quot;&auml;&quot; 
0732                Eval( bBlock, oGet, Asc(&quot;a&quot;), Asc(&quot;e&quot;) ) 
0733             CASE cChar == &quot;&ouml;&quot; 
0734                Eval( bBlock, oGet, Asc(&quot;o&quot;), Asc(&quot;e&quot;) ) 
0735             CASE cChar == &quot;&uuml;&quot; 
0736                Eval( bBlock, oGet, Asc(&quot;u&quot;), Asc(&quot;e&quot;) ) 
0737             CASE cChar == &quot;&szlig;&quot; 
0738                Eval( bBlock, oGet, Asc(&quot;s&quot;), Asc(&quot;s&quot;) ) 
0739             OTHERWISE 
0740                GetApplykey( oGet, nKey ) 
0741             ENDCASE 
0742
0743          ENDDO 
0744
0745          IF ! GetPostValidate( oGet ) 
0746             oGet:exitState:= GE_NOEXIT // postvalidation 
0747          ENDIF                         // has failed 
0748       ENDDO 
0749
0750       oGet:killFocus()                 // set back input focus 
0751
0752    ENDIF 
0753
0754 RETURN 
0755 </code></pre>
0756        </div>
0757       </figure></p>
0758     <p>Within the user-defined Get reader <span class="italic">NoUmlauts()</span>, keys are read using Inkey(). The keyboard input is then tested to see if it includes one of the German language characters &Auml;, &Ouml;, &Uuml;, &auml;, &ouml;, &uuml; and &szlig;. If one of these characters is present, it is translated to the two equivalent characters Ae, Oe, Ue, ae, oe, ue, or ss. All other characters are passed along with the Get object to the function GetApplykey() which defines the default behavior for transferring characters into the edit buffer of Get objects. </p>
0759     <p>In order to modify this Get reader to use the function AppEvent() for reading events (instead of just keystrokes), additional variables must be declared for the message parameters passed by reference to AppEvent(). Instead of GetApplykey(), the function GetHandleEvent() must be used for default handling of other events. </p>
0760    </div>
0761   </div>
0762  </div>
0763  <div>
0764   <a  class="anchor" NAME="display_of_tables"></a>
0765   <div class="ui vertical basic segment">
0766    <div class="ui header" >Display of tables</div>
0767    <div>
0768     <p>Along with formatted data input using &#64;...SAY...GET with READ or using Get objects with ReadModal(), displaying an entire table is an important and frequently used interface feature. A table allows the user to interactively view large amounts of data. Data in a table is organized into rows and columns. This data can be from a database file open in a work area or from an array stored in memory. The TBrowse class and the TBColumn class are included in Xbase++ to allow tables to be displayed. These classes are used together but each performs a specific set of tasks when displaying tables. Table display is possible only through the combined efforts of objects of both classes. A TBrowse object performs the screen display and controls the current row and column of a table. A TBColumn object provides the data for a column of the table displayed by the Tbrowse object. TBColumn objects must be assigned to the TBrowse object and are used by the TBrowse object when a user views a table. </p>
0769     <p><div class="ui vertical basic segment wdg-table-with-notes">
0770        <div class="ui small header wdg-table-header">Classes for the display of tables and database files</div>
0771        <table class="ui stackable table wdg-table-table">
0772         <thead class="wdg-table-thead">
0773          <tr class="wdg-table-thead-tr">
0774           <th class="wdg-table-thead-th">Class</th>
0775           <th class="wdg-table-thead-th">Description</th>
0776          </tr>
0777         </thead>
0778         <tbody class="wdg-table-tbody">
0779          <tr class="wdg-table-tbody-tr">
0780           <td class="wdg-table-tbody-td">TBrowse()</td>
0781           <td class="wdg-table-tbody-td">Browsing of data that can be represented as a table of rows and columns</td>
0782          </tr>
0783          <tr class="wdg-table-tbody-tr">
0784           <td class="wdg-table-tbody-td">TBColumn()</td>
0785           <td class="wdg-table-tbody-td">Display a single column of data in the browse window of the TBrowse object</td>
0786          </tr>
0787         </tbody>
0788        </table>
0789       </div></p>
0790     <p>The <span class="italic">TBrowse</span> and <span class="italic">TBColumn</span> classes are associated with a set of functions that exist in Xbase++ only to provide compatibility with Clipper. The source code for the compatibility functions listed in the following table are contained in the files DBEDIT.PRG, BROWSYS.PRG and BROWUTIL.PRG. </p>
0791     <p><div class="ui vertical basic segment wdg-table-with-notes">
0792        <div class="ui small header wdg-table-header">Compatibility functions for the display of tables and database files</div>
0793        <table class="ui stackable table wdg-table-table">
0794         <thead class="wdg-table-thead">
0795          <tr class="wdg-table-thead-tr">
0796           <th class="wdg-table-thead-th">Function</th>
0797           <th class="wdg-table-thead-th">Description</th>
0798          </tr>
0799         </thead>
0800         <tbody class="wdg-table-tbody">
0801          <tr class="wdg-table-tbody-tr">
0802           <td class="wdg-table-tbody-td">Browse()</td>
0803           <td class="wdg-table-tbody-td">Browse database file, including DELETE and APPEND</td>
0804          </tr>
0805          <tr class="wdg-table-tbody-tr">
0806           <td class="wdg-table-tbody-td">DbEdit()</td>
0807           <td class="wdg-table-tbody-td">Browse database file with UDF control</td>
0808          </tr>
0809          <tr class="wdg-table-tbody-tr">
0810           <td class="wdg-table-tbody-td">TBrowseNew()</td>
0811           <td class="wdg-table-tbody-td">Create TBrowse object</td>
0812          </tr>
0813          <tr class="wdg-table-tbody-tr">
0814           <td class="wdg-table-tbody-td">TBrowseDb()</td>
0815           <td class="wdg-table-tbody-td">Create TBrowse object for database file</td>
0816          </tr>
0817          <tr class="wdg-table-tbody-tr">
0818           <td class="wdg-table-tbody-td">TBColumnNew()</td>
0819           <td class="wdg-table-tbody-td">Create TBColumn object</td>
0820          </tr>
0821         </tbody>
0822        </table>
0823       </div></p>
0824     <p>TBrowse objects provide a versatile mechanism for displaying data in the form of a table. TBrowse objects display tabular data in a defined section of the screen (the browse window). </p>
0825     <p>Tables are often too large to be entirely displayed on the screen. TBrowse objects provide methods that allow tables to be viewed interactively on the screen. The TBrowse class is designed so that an object of this class does not know anything about the data source it displays. To display data, a TBrowse object relies on one or more objects of the TBColumn class to provide the data for individual columns in the table.  A TBrowse object displays the data provided by the TBColumn objects on the screen. Each TBColumn object deals with only one column of the associated table. The TBrowse object manages its own cell cursor and displays the data in the current row and column of a table (the current cell) in a highlighted color. </p>
0826     <p>A user can position the cell cursor in the table using the cursor keys. A TBrowse object includes many methods which move the cell cursor. As soon as the user tries to move the cell cursor out of the Browse window, the TBrowse object automatically synchronizes the visible data on the screen with the data of the underlying table and scrolls the data in the browse window. </p>
0827     <p>Since the data source of the table is not known to the TBrowse object, three functions must be specified to execute the three basic operations that can be performed on a table: jump to the start of the table, jump to the end of the table and change the current row within the table. These operations are comparable to the file commands GO TOP, GO BOTTOM and SKIP. These functions are provided to TBrowse objects as code blocks that are automatically executed within specific methods of the TBrowse object. </p>
0828     <p>The browse window where the TBrowse object displays tabular data can be divided into three areas: headers or column titles, data lines containing the data, and footers at the bottom of each column. Each area, as well as each individual column, can be optionally delimited by a separating line. </p>
0829     <p>In contrast to TBrowse objects, TBColumn objects are very simple objects that contain instance variables but do not have their own methods. TBColumn objects are needed to provide data for tables displayed using TBrowse objects and are useless without an associated TBrowse object. A TBColumn object contains in its instance variable all of the information required for displaying a single column of a table in the browse window of the TBrowse object. </p>
0830     <p>The most important TBColumn instance variable (<span class="italic">:block</span>) contains a data code block that provides the data from the data source for a column of data. This code block might access a field variable in a work area, or a column in an array. TBColumn objects can also control the color of the data displayed based on its value. </p>
0831     <p>If new values are assigned to the instance variables of a TBColumn object after the TBrowse object has already displayed data using the TBColumn object, the method oTBrowse:configure() must be executed to update the columns in the browse window (see TBrowse class). </p>
0832    </div>
0833   </div>
0834  </div>
0835 </div>
0836
0837 @SECTION feedback
0838 <a href="/feedback/feedback.cxp?bid=2515&amp;fid=F14BGD&amp;title=Applications%20in%20character%20mode%20%28VIO%20mode%29"  rel="nofollow">this form</a>
0839
0840 @SECTION right-menu-go-to
0841 <div class="menu" id="wdg-goto-menu">
0842 <a class="item" href="#feedback" id="wdg-right-menu-feedback">Feedback</a><a class="item" href="#unformatted_input_and_output" id="wdg-right-menu-item">Unformatted input and output</a><a class="item" href="#formatted_input_and_output" id="wdg-right-menu-item">Formatted input and output</a><a class="item" href="#keyboard_and_mouse" id="wdg-right-menu-item">Keyboard and mouse</a><a class="item" href="#the_default_get_system" id="wdg-right-menu-item">The default Get system</a><a class="item" href="#functions_of_the_get_system" id="wdg-right-menu-item">Functions of the Get system</a><a class="item" href="#modification_of_the_get_system" id="wdg-right-menu-item">Modification of the Get system</a><a class="item" href="#display_of_tables" id="wdg-right-menu-item">Display of tables</a>
0843 <a class="item" href="#end-of-page">End of page</a>
0844 </div>
0845