Documentation Archive Developer
Search
PATH Documentation > WebObjects

Table of Contents

EOPickTextAssociation


Inherits from:
EOValueAssociation : EOWidgetAssociation : EOAssociation : EODelayedObserver (EOControl) : Object
Implements:
NSDisposable
EOObserving (EOControl)
Package:
com.webobjects.eointerface


Class Description


An EOPickTextAssociation takes the value of its display object, such as an NSTextField, 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.




Interfaces Implemented


NSDisposable
EOObserving


Method Types


All methods
EOPickTextAssociation
displayValueAspect
primaryAspect


Constructors



EOPickTextAssociation

public EOPickTextAssociation(Object aDisplayObject)

Creates a new EOPickTextAssociation to monitor and update the row values in aDisplayObject, an NSControl (Cocoa) 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)




Instance Methods



displayValueAspect

protected String displayValueAspect()

Description forthcoming.

primaryAspect

public String primaryAspect()

Returns EOAssociation.SourceAspect.

© 2001 Apple Computer, Inc. (Last Published April 21, 2001)


Table of Contents