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

Table of Contents

EOMatrixAssociation


Inherits from:
EOAssociation : EODelayedObserver (EOControl) : NSObject
Conforms to:
NSCoding
(EOAssociation)
EOObserving (EODelayedObserver)
NSObject (NSObject)
Declared in:
EOInterface/EOMatrixAssociation.h




Class Description


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).


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.


Examples

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).




Table of Contents