GEOS SDK TechDocs|
|
6 LocatorClass |
6.2 Text Mode MSG_LOCATOR_DO_CHAR_LOCATE
The Locator object can be in one of two modes: index mode or text search mode. The Locator object will appear and act differently depending on it operating mode.
When the Locator object is in index mode, it takes the form of an action bar, shown below:
Tapping on one of the Locator's dyad buttons (`AB', `EF', etc.) sends
MSG_LOCATOR_DO_CHAR_LOCATE
to the Locator object itself. The Locator responds to this request by sending
MSG_TABLE_CHAR_LOCATE
to its linked Table. Intercept that message in
TableClass
to provide your searching behavior.
Repeatedly clicking on a dyad button will cycle through the two letters of the dyad to perform the search. For example, clicking once on the `AB' dyad button will send the aforementioned messages with a character argument of `A.' Clicking again on that button will send these messages with an argument of `B' and clicking yet again on that button will send these messages with an argument of `A' again.
You will probably not want to implement any searching behavior in your Locator object; it is sufficient merely to include the Locator object and intercept
MSG_TABLE_CHAR_LOCATE
in the Table object itself. This is discussed in Handling Locator Searches.
Boolean MSG_LOCATOR_DO_CHAR_LOCATE(
char searchChar);
This message instructs a Locator object (in index mode) to locate the entered character within the
TableClass
object that is in the Locator's LI_
destination
field. It does this by sending the Table object
MSG_TABLE_CHAR_LOCATE
, passing it the search character. You will want to intercept that message within your subclass of
TableClass
to implement your search criteria.
When in index mode, this message is sent with a single index letter (e.g. `A', or `B' in the "AB" dyad) of the tapped dyad button. Repeatedly tapping on a dyad button will cycle through the indexed letters, sending out this message a separate time for each tap (first with `A,' then with `B,' and then with `A' again). For this reason, make sure that code that implements this message is not run under the UI thread. (Doing so may result in bothersome screen "glitches" as the Table scrolls first to the `A' entries, then to the `B' entries, etc.
Source: The Locator object.
Destination: A Locator object.
Parameters:
searchChar
Character to pass to
MSG_TABLE_CHAR_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.
GEOS SDK TechDocs|
|
6 LocatorClass |
6.2 Text Mode