- Inherits from:
- EOAssociation : EODelayedObserver (EOControl) : NSObject
- Implements:
- EOObserving (EODelayedObserver)
- Package:
- com.apple.yellow.eointerface
An EOMatrixAssociation allows you to populate an NSMatrix's cells (Application Kit). EOMatrixAssociation supports connections for both cell titles and icons, depending on the matrix's prototype cell. You define the prototype in Interface Builder (to display an icon only, text only, or both).
Note: This class doesn't exist in the com.apple.client.eointerface package. |
Usable With |
NSMatrix (Application Kit) |
Aspects | |
enabled | A boolean attribute of the objects, which determines whether the matrix is enabled. |
image | An NSImage attribute of the objects to display in the cell. |
title | An attribute of the objects to display in the cell. |
Object Keys Taken | |
target | On receiving an action message from the matrix, an EOMatrixAssociation updates its display group's selection. |
Suppose that you want to display actors' names and pictures
in an NSMatrix. Start with a TalentPhoto display group (where a
TalentPhoto object has a relationship to its Talent object). In
interface builder, create a button containing both an image and
text. Then, alternate-drag to create a matrix of buttons. Control-drag
from the matrix to the photo display group. In the Connections inspector,
choose EOMatrixAssociation, and bind the image
aspect
to the photo
attribute. Repeat, binding
the title
aspect to the talent.lastName
attribute.
Note that you can group the matrix in a scroll view. An EOMatrixAssociation will automatically manage the size of the matrix for this (for vertical scrolling only).
public
EOMatrixAssociation
(Object aDisplayObject)
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)