The Table Objects: 6.2 LocatorClass: Text Mode

Up: GEOS SDK TechDocs| Up | Prev: 6.1 Index Mode | Next: 6.3 LocatorClass Instance Data
MSG_LOCATOR_DO_STRING_LOCATE

When the Locator object is in text search mode, the action bar "morphs" into a text search entry field shown below:

Entering text into the text search field will send MSG_LOCATOR_DO_STRING_LOCATE to itself. The Locator responds to this message by immediately sending its linked Table MSG_TABLE_STRING_LOCATE . Repeatedly entering valid characters will match succeeding characters.

For example, typing `B' in a Table object will send MSG_TABLE_STRING_LOCATE to the Table with the string "B." Typing `e' after that letter will send MSG_TABLE_STRING_LOCATE passing the string "Be." Whenever the Table can no longer find a match for its character string, MSG_TABLE_STRING_LOCATE will return TRUE (an error condition) and the character will not be allowed into the text entry field. You can complete a text mode search and return to index mode by pressing ENTER.

MSG_LOCATOR_DO_STRING_LOCATE

Boolean	MSG_LOCATOR_DO_STRING_LOCATE(
        char		*locateString);

This message instructs a Locator object (in text mode) to locate the entered string within the TableClass object that is in the Locator's LI_ destination field. It does this by sending the Table object MSG_TABLE_STRING_LOCATE , passing it the pointer to the search string. You will want to intercept that message within your subclass of TableClass to implement your search criteria.

The Locator object enters text search mode whenever the user types a printable character on the keyboard; in that case, the locateString contains the character typed and a search (with this message) is performed. I.e. a search is performed after each successive character is entered. If the search is unsuccessful, the character will not appear.

Source: The Locator object.

Destination: A Locator object.

Parameters: locateString Pointer to the null-terminated search string to pass to MSG_TABLE_STRING_LOCATE .

Return: Non-zero if the search failed. Note that if you do not write a search method for TableClass, this message will always return non-zero.


Up: GEOS SDK TechDocs| Up | Prev: 6.1 Index Mode | Next: 6.3 LocatorClass Instance Data