Show/Hide Toolbars

Flynet Studio Core Navigation Properties

Navigation: Core Navigation Properties

The UIEntryByFieldID Generated Class

Scroll Prev Top Next More

The UIEntryByFieldID generated class extends the UIEntryField class to support screens that use a field identifier to position the cursor in a target entry field.  This class is provided as a sample, as we have found that while the pattern is similar across customers, each application has some unique navigation aspects that usually require some customization.

 

Sample Screen-- a 10[enter] will position the cursor at the WEIGHT [lbs] field.

 

clip0001

 

When a screen uses the UIEntryByFieldID class, an important assumption is made that the bottom entry field (where the cursor is positioned in the sample) is named Command on all screens utilizing this class for field entry.  This allows the navigation logic to properly position the cursor in the field when needed to initiate data entry.

 

Important Class Members

 

Regex FindID (static)

 

The FindID regular expression is constructed by the UIEnteryByFieldID static constructor and is designed to enable dynamic identification of a field's numeric identifier.  This avoids the need to specify the identifier in a FV Studio property using the FieldEntryOptions string property.

 

When a UIEntryByFieldID object is first used, it will utilize the FindID regular expression object to identify it's command identifier.

 

FindFieldIndex Method

 

This method will use the FindID regular expression to find the fields numeric index.  It will set an active error message for the field if the index cannot be determined.

 

PositionToLinked Method

 

This method replaces the PositionTo base method (PositionTo is overridden and calls PositionToLinked).  It is a complex set of logic and is controlled by the FieldEntryOptions property.

 

First, if the cursor is at the field's start location, returns true

Next, if the cursor is not at the command row, will send an [enter] key and wait for the cursor to land at the command row

Next, will find the field's index using FindFieldIndex if the index is not set yet

If FieldEntryOptions is not blank, will use ProcessLinkedFields to enter this field as part of a set of fields

Otherwise, will enter the field Index and [enter], and wait for the cursor to land at the field's start

Will return true if all is well, false if not positioned

 

Enter Method

 

Override of the UIEntryField method -- will call PositionToLinked then send the new field text and [enter], waiting for the cursor to land at the Command field's row and column.  Will gather any error messages in the case of an edit error and position the cursor at the command row and column.  Returns true for a good entry, false for an error.  Any errors will result in a 1 second delay.

 

ProcessLinkedFields Method

 

Positions by entering through linked fields based on the position in the links of the current field.  If this field is the first, it will act like the PositionToLinked--if it is not the first, it will try to "tab through" the preceding fields in the link.

 

Linked fields are those that are entered in a "group" where only the first field has a number and the other fields are below it in the screen.  As each field's data is entered, instead of the cursor returning to the command field, it jumps to the next field in links.

 

For the UIEntryByFieldID class, this is managed with the FieldEntryOptions setting.