Inherits From:
EOAssociation : EODelayedObserver : NSObject
Conforms To:
NSCoding (EOAssociation)
EOObserving (EODelayedObserver)
NSObject (NSObject)
Declared in: EOInterface/EOComboBoxAssociation.h
titles
EODisplayGroup. selectedObject
is usually mutually exclusive with
selectedTitle
. When the value of the NSComboBox changes, the
association updates the relationship to point to the new object.
titles
aspect. The value displayed by the NSComboBox can be bound by one of two aspects: selectedTitle , which is useful for values representable as strings; and selectedObject , for the destination object of a relationship.
Examples
Selecting a string from a static list: Suppose you have a Movie display group and you want to provide a ComboBox for setting the rating. In this example the rating is a string property of the Movie object rather than a relationship to a Rating enterprise object. Type the list of ratings into the ComboBox in Interface Builder, and then bind the selectedTitle
aspect to the "rating" property of the Movie display group.
Selecting a string from a dynamic list: This example is similar to the previous one, except that you're filling the ComboBox from the "ratingString" property of an EODisplayGroup containing an array of Rating objects fetched from an external source. Bind the titles
aspect to the "ratingString" property of the Ratings display group, and bind the selectedTitle
aspect to the "rating" property of the Movie display group.
Selecting an enterprise object to assign to a to-one relationship: Suppose you have a list of employees and want to assign each employee a department. In terms of the object model, you want to assign a Department enterprise object to the "department" property of an Employee enterprise object. Bind the titles
aspect to the "name" property of a Department display group, and bind selectedObject
to the "department" relationship property of the Employee display group.
If the selectedObject
aspect is bound and the user types in a value that doesn't match any of those currently in the list, an error panel is displayed.
Copyright © 1997, Apple Computer, Inc. All rights reserved.