Documentation Archive Developer
Search
PATH  WebObjects 4.0 Documentation > EOInterface Reference



EOPickTextAssociation

Inherits From:
EOAssociation : EODelayedObserver (EOControl) : NSObject

Conforms To: NSCoding (EOAssociation)
EOObserving (EODelayedObserver)
NSObject (NSObject)

Declared in: EOInterface/EOPickTextAssociation.h


Class Description

An EOPickTextAssociation takes the value of its display object, an NSControl (Application Kit), and uses it to form a qualifier with up to three LIKE operators, each compared to a different key of the EODisplayGroup. This allows the user to perform a similarity search based on whole or partial values.

EOPickTextAssociations are most often used with a table view to qualify a list of fetched objects that is too long for convenient scrolling.

Usable With
Any NSControl

Aspects
matchKey1 An attribute to match using a LIKE qualifier.
matchKey2 An attribute to match using a LIKE qualifier.
matchKey3 An attribute to match using a LIKE qualifier.

Object Keys Taken
target The EOPickTextAssociation applies its qualifier when sent an action message from the NSControl.
delegate The EOPickTextAssociation applies its qualifier when sent a controlTextDidChange: message, causing dynamic update as the user types.


Example

Make an EOPickTextAssociation between an NSTextField and an EODisplayGroup of People objects. Bind the matchKey1 and matchKey2 aspects to the "lastName" and "firstName" keys. If the user types "Bi" in the field, the EOPickTextAssociation applies the following qualifier to the EODisplayGroup:

(lastName like "*Bi*") OR (firstName like "*Bi*")

which matches names like "Bill Smith" and "Joe Biggs". The list of objects displayed in the display group is restricted to those that match the qualifier.





Copyright © 1998, Apple Computer, Inc. All rights reserved.