User Tools

Site Tools


locatorclass_overview.htm
Navigation:  ABC Library Reference > LocatorClass >====== LocatorClass Overview C6H0009.jpg ====== Previous pageReturn to chapter overviewNext page

The LocatorClass is an abstract class–it is not useful by itself. However, other useful classes are derived from it and other structures (such as the BrowseClass) use it to reference its derived classes.

LocatorClass Concepts

The classes derived from LocatorClass let you specify a locator control and a sort field on which to search for each sort order of a BrowseClass object. These LocatorClass objects help the BrowseClass locate and scroll to the requested items.

LocatorClass objects implement some of the common variations in locator controls (none, STRING, ENTRY), locator invocation (keystroke, ENTER key, TAB key), and search methods (single character search starting from current item, incremental character, exclusive search) that occur in the browse context.

LocatorClass Relationship to Other Application Builder Classes

The BrowseClass optionally uses the classes derived from the LocatorClass. Therefore, if your BrowseClass objects use a locator, then your program must instantiate a LocatorClass for each use.

The StepLocatorClass, EntryLocatorClass, IncrementalLocatorClass,and FilterLocatorClass are all derived (directly or indirectly) from the LocatorClass. Each of these derived classes provides slightly different search behaviors and characteristics.

Step Locator:

Use a Step Locator when the search field is a STRING, CSTRING, or PSTRING, a single character search is sufficient (a step locator is not appropriate when there are many key values that begin with the same character), and you want the search to take place immediately upon the end user's keystroke. Step Locators are not appropriate for numeric keys.

Entry Locator:

Use an Entry Locator when you want a multi-character search (more precise) on numeric or alphanumeric keys and you want to delay the search until the user accepts the locator control. The delayed search reduces network traffic and provides a smoother search in a client-server environment.

Incremental Locator:

Use an Incremental locator when you want a multi-character search (more precise) on numeric or alphanumeric keys and you want the search to take place immediately upon the end user's keystroke.

Filter Locator:

Use a Filter Locator when you want a multi-character search (more precise) on alphanumeric keys and you want to minimize network traffic.

LocatorClass ABC Template Implementation

Because the LocatorClass is abstract, the ABC Template generated code does not directly reference the LocatorClass.

LocatorClass Source Files

The LocatorClass source code is installed by default to the Clarion \LIBSRC folder. The LocatorClass source code and its respective components are contained in:

ABBROWSE.INC LocatorClass declarations
ABBROWSE.CLW LocatorClass method definitions
locatorclass_overview.htm.txt · Last modified: 2021/04/15 15:57 by 127.0.0.1