Documentation Archive Developer
Search
[an error occurred while processing this directive] PATH  Documentation > WebObjects 4.5 > EOInterface Reference

Table of Contents

EOPickTextAssociation


Inherits from:
EOAssociation : EODelayedObserver (EOControl) : NSObject
Implements:
EOObserving (EODelayedObserver)
Package:
com.apple.yellow.eointerface


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.


Note: This class doesn't exist in the com.apple.client.eointerface package.

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.




Constructors



EOPickTextAssociation

public EOPickTextAssociation(Object aDisplayObject)

Creates a new EOPickTextAssociation to monitor and update the row values in aDisplayObject, an NSControl (Application Kit) which has a text as an attribute.

You normally set up associations with the Interface Builder application, in which case you don't need to create them programmatically. However, if you do create them up programmatically, setting them up is a multi-step process. After creating an association, you must bind its aspects and establish its connections.

See Also: bindAspect (EOAssociation), establishConnection (EOAssociation)




Table of Contents