The text of a manual · part 7 of 25
Application Builder for DuraTrax/LaserLite/LaserLite Pro/LaserLite Mx, for Windows Computers, pages 61 to 70
Pages 61 to 70 of 245
The original document is the PDF (2.4 MB). This is its text as extracted, unedited; tables and drawings read best in the PDF, and each page heading opens it at that page.
For the Videx DuraTrax, Videx LaserLite, Videx LaserLite Mx and Videx LaserLite Pro
Page 61
The basic idea behind looping is the application loops back through the Input Handlers that were previously visited (that is, have been “current” Handlers), looking for one that can accept the current user input. An application’s normal tendency is to try to move to the right. If the application cannot move to the right, and if the “current” Handler can end a loop (curved arrow on right side), the application will loop back a step at a time and ask the first Input Handler it finds that starts a loop (curved arrow on left side) if it can accept the input. If it can, the current record is committed to the data file; the input is added to the new current record; the application steps to the accepting Input Handler; and the application again continues to the right. If it cannot, the application asks any other Input Handlers in the same column (that start a loop) before stepping back another column and repeating the procedure. In order for a loop to occur, the “current” Handler must be allowed to end a loop, and the Input Handler we are looping back to (the one accepting the user input) must be allowed to start a loop. In the application in Figure 2-17, the “Guard” Handler can start and end a loop (arrows on right and left), the “Location” Handler can start a loop (arrow on left), and the “Status” Handler can end a loop (arrow on right). This means that it is possible to loop back from “Status” to either “Guard” or “Location,” and it is also possible to loop back from “Guard” to itself.
Figure 2-17 Security Application - Looping When the application loops back to the left, the current record is complete, and is written to the data file. At this point, the application is ready to start constructing a new current record. The new current record may already be partially constructed. If the loop does not go all the way back to step 1, then the application uses the previous data in the new record, up to the start of the loop. (See the example on pages 7–8.) Chapter 2 Application Builder, Menus & Windows
53
Page 62
We will use Figure 2-18 to illustrate the path a loop takes.
Figure 2-18 Loop Example Suppose that in this application: 1. All of the Input Handlers (except Begin) can both start and end a loop and Input Handler (K) is a Detour Handler. 2. The Input Handlers Begin, E, and F have been visited. 3. The F Handler is the “current” Handler. If the F Handler is the “current” Handler and a user entry is made, the application would search for an accepting Handler in the following order: G, J, D, F, I, A, C, E, H, and if none of the normal Input Handlers can accept the input, the application then checks Detour Handler, K. Note 1: The B Handler is not searched, because it cannot be directly reached from a previously visited Input Handler. Note 2: All normal Input Handlers are searched before a Detour Handler is searched. Note 3: An application can never loop back all the way to the Begin Handler. The only time the application is in the Begin Handler is when it starts running, before any data has been entered. 54
Chapter 2 Application Builder, Menus & Windows
Page 63
Matching Edit Box
Figure 2-19 Matching Property The Matching property (Figure 2-19) determines whether an Input Handler will accept an entry. An Input Handler will only accept an entry if it matches the Matching property. The Matching property is the only property that does not have a default setting; you must identify the Matching property for each Input Handler in order for the software to build the application. There are several Matching property choices (Figure 2-20); they are described in the following sections.
Figure 2-20 Matching Property Choices
Chapter 2 Application Builder, Menus & Windows
55
Page 64
is in CRF file The entry must match one of the selected cross-reference (CRF) file’s keys. (Keys are the entries in the CRF file’s Input column.) The selected CRF file will automatically transfer to the data collector along with the application when Transfer Application is chosen from the File menu.
Figure 2-21 Matching Property - Is In CRF File To select a CRF file, type the file’s name and pathway in the Properties window edit box or click Browse to navigate to the file (Figure 2-22).
Figure 2-22 Is In CRF File - Click Browse
56
Chapter 2 Application Builder, Menus & Windows
Page 65
If you click Browse to navigate to the file, the Open window appears. To view the CRF cross-reference files, choose Cross-reference or Any file from the File of type menu at the bottom of the window. Select the CRF file and click Open (Figure 2-23) or double-click the file’s icon; the name of the CRF file and its pathway are then displayed in the Properties window’s edit box (Figure 2-24).
Figure 2-23 Open CRF File Window
Figure 2-24 Matching Property - Is In Scstat.crf File
Chapter 2 Application Builder, Menus & Windows
57
Page 66
is automatic The entry is automatically entered by the application without any activity by the user at all. In other words, the application pretends that the user made an entry, and the Input Handler accepted it, even though the user didn’t do anything. Type the data you want automatically entered in the edit box (Figure 2-25).
Figure 2-25 Matching Property - Is Automatic starts with The entry must start with the entered text. Type the text that the user input must start with in the edit box (Figure 2-26).
Figure 2-26 Matching Property - Starts With
58
Chapter 2 Application Builder, Menus & Windows
Page 67
equals The entry must exactly match the text typed in the edit box (Figure 227).
Figure 2-27 Matching Property - Equals contains The entry must contain the text typed in the edit box somewhere within the user input (Figure 2-28).
Figure 2-28 Matching Property - Contains
Chapter 2 Application Builder, Menus & Windows
59
Page 68
is a number The entry must be a positive number (Figure 2-29). The number must be composed of the digits 0–9. The number may not contain any symbols such as commas, decimals, or percentage marks.
Figure 2-29 Matching Property - Is a Number matches TWII pattern The entry must satisfy the TimeWand II (TWII) match pattern typed in the edit box (Figure 2-30). If you are familiar with the TimeWand II bar code reader and its match patterns, this command will be familiar to you.
Figure 2-30 Matching Property - Matches TWII Pattern A TWII match pattern is a pattern you create by combining letters, numbers, symbols, and/or wild card characters to describe the input acceptable to the Input Handler.
60
Chapter 2 Application Builder, Menus & Windows
Page 69
When specifying a TWII match pattern, the following five characters are used as wild cards to create the pattern: a number [0-9] must be in this position a letter [a..z, A..Z] must be in this position any character can be in this position the rest of the string can be any characters or no character the rest of the string must be numbers [0..9] or no character
# @ & = >
These are the actual letters, numbers, and symbols the match pattern can contain: A..Z
0..9 space
+
-
/
% .
$
A TWII match pattern can be used in a variety of situations to provide strict control (for example, the match pattern VIDEX-7## would require an entry that begins with VIDEX-7 followed by two numbers) or to allow flexibility (for example, the match pattern &= would accept any entry). Following are examples of TWII match patterns: &= #> E= E> E0003 AAA= AA#A AA@A AA&A any entry is acceptable any entry consisting of numbers any entry that starts with the letter E any entry that starts with the letter E and is followed only by numeric digits entry must match E0003 exactly any entry that begins with AAA a four-digit long entry with A in the first, second, and fourth positions and a number in the third position same as previous entry, but with a letter in the third position same as previous entry, but with any character in the third position
Chapter 2 Application Builder, Menus & Windows
61
Page 70
Application Builder version 2.1.0 and higher implements a feature which allows “Does not match a TimeWand II pattern” matching criterion. To do this, choose the matching criterion “matches TWII pattern” but precede the pattern with a “ < ”. For example, if barcodes which begin with “A” are to be rejected by an input handler, the TimeWand II pattern would be “<A&=”. accepted by plug-in This feature provides for more complex pattern matching by using BASIC source code to define the entry. This feature assumes the user has a fundamental knowledge of BASIC. BASIC source is inserted in the application exactly as it is entered in the edit box (Figure 2-31).
Figure 2-31 Matching Property - Accepted By Plug-in For example, the following line of BASIC code: If right$(evt_data$,1) = "T" then accepts% = true% uses the Videx BASIC RIGHT$ function to define a match pattern that accepts any entry that ends with a T. EVT_DATA$ is the string that contains the current entry and ACCEPTS% must be set equal to true to accept the entry. What this line of code does is look at the EVT_DATA$ string, take the rightmost character, and see if the character is equal to T; if the character is a T, then ACCEPTS% is set equal to true and the current input is accepted. If the character is not a T, then the current input is not accepted. 62
Chapter 2 Application Builder, Menus & Windows