Inherits From:
EOGenericControlAssociation : EOAssociation : EODelayedObserver : NSObject
Conforms To:
NSCoding (EOAssociation)
EOObserving (EODelayedObserver)
NSObject (NSObject)
Declared in: EOInterface/EOControlAssociation.h
EOControlAssociations access values using NSControl's setObjectValue: method, which allows values with non-string representations to be displayed. An EOControlAssociation can be bound to an NSImageView, for example, with an attribute whose class is NSImage.
Examples
To display a movie's budget in an NSTextField, create an EOControlAssociation to the Movie display group and bind the value aspect to the "budget" key. If the NSTextField is editable, then when the user types a new value and presses Enter or Tab, the selected movie's budget attribute is changed.
Assuming that Movie objects implement an isBudgetNegotiable method, you can make the NSTextField uneditable depending on the selected movie. To do so, add an "isBudgetNegotiable" key to the Movie display group in Interface Builder and bind the the "enabled" key to it.
Returns the receiver's control object (for EOControlAssociation this method is equivalent to EOAssociation's object method).
editingAssociation
- (EOGenericControlAssociation *)editingAssociation
Returns self .
Copyright © 1997, Apple Computer, Inc. All rights reserved.