- Inherits from:
- (com.apple.client.eointerface) EOAssociation : EODelayedObserver (EOControl) : Object
(com.apple.yellow.eointerface) EOAssociation : EODelayedObserver (EOControl) : NSObject
- Implements:
- EOObserving (EODelayedObserver)
- (com.apple.client.eointerface only) NSDisposable (EOAssociation)
- Package:
- com.apple.client.eointerface
- com.apple.yellow.eointerface
An EOMasterDetailAssociation object binds one EODisplayGroup (the detail) to a relationship in another (the master), so that the detail display group contains the destination objects for the object selected in the master. The display groups' data sources also operate in a master-detail arrangement, meaning changes to one are immediately reflected in the other. In this arrangement, the detail EODisplayGroup's data source must be an EODetailDataSource. The detail objects are taken directly from the selected object in the master EODisplayGroup, so that changes to the objects in one EODisplayGroup are instantly reflected in the other.
In com.apple.yellow.eointerface, by contrast, with an EOMasterPeerAssociation, the two EODisplayGroups are independent of each other (EOMasterPeerAssociation is not a com.apple.client.eointerface class). In a master-peer setup, insertions and deletions in the detail EODisplayGroup don't affect the corresponding relationship property of the selected object in the master EODisplayGroup. Master-peer setups are more appropriate when no insertions or deletions will be made in the detail EODisplayGroup. See the EOMasterPeerAssociation class specification for more information.
Usable With |
EODisplayGroups whose data sources are EODetailDataSources |
Aspects | |
parent | A relationship from the master EODisplayGroup. |
Suppose you have a master EODisplayGroup displaying Movie
objects and a detail display group displaying Talent objects. The
two display groups are bound to one another through Movie's directors
relationship-a
to-many relationship from Movie to Talent. When a Movie is selected,
you want the Talent display group to display the Talents who directed
the Movie. Inserting a new director into the Talent display group
should add the director to the selected Movie's directors
relationship;
and similarly, deleting a director from the Talent display group
should remove the director from the selected Movie's directors
relationship.
To do this, in Interface Builder, control-drag a connection
from the Talent display group to the Movie display group. In the
Connections inspector, choose EOMasterDetailAssociation, and bind parent
aspect
to the "directors" key.
public
EOMasterDetailAssociation
(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)
public boolean
isUsableWithObject
(Object aDisplayObject)
true
if aDisplayObject is
an instance of EODisplayGroup and its dataSource is either null
or
an EODetailDataSource (EOControl).See Also: isUsableWithObject ( EOAssociation)
public String
primaryAspect
()
EOAssociation.
ParentAspect.See Also: primaryAspect ( EOAssociation)
public int
priority
()
public void
subjectChanged
()