ETMutableObjectViewpoint class documentation
ETMutableObjectViewpoint : NSObject <ETPropertyViewpoint>Overview
ETMutableObjectViewpoint turns an attribute or to-one relationship property belonging to a represented object, into a mutable object proxy that updates the model property with a new immutable object in reaction to -setValue:forProperty: .
ETMutableObjectViewpoint doesn't work as a mutable collection proxy for a to-many relationship property, you must use ETCollectionViewpoint instead.
Using a mutable object as ETMutableObjectViewpoint value doesn't bring a lot of benefits, but is well supported and works transparently.
For supporting editing a mutable object class, ETMutableObjectViewpoint must be subclassed. For example, for editing NSSortDescriptor, you must implement a new subclass such as ETMutableSortDescriptorViewpoint (this one is provided by EtoileUI though).
This viewpoint uses Key-Value-Observing to detect any property changes on the represented object.
Initialization
Represented Property
- - (NSString *) name
The property name of the original object value in the represented object.
The object value bound to the property can be a collection. For customizing the collection interaction through the viewpoint, see ETCollectionViewpoint.
Controlling Represented Object Access
- - (void) setUsesKeyValueCodingForAccessingValueProperties: (BOOL)usesKeyValueCodingForAccessingValueProperties
- Description forthcoming.
Reading and Writing the value
Property Value Coding
- - (id) valueForProperty: (NSString *)key
Returns a value bound to a property of the object -value . This method accesses properties of the represented property.
- - (BOOL) setValue: (id)value forProperty: (NSString *)key
Returns a value bound to a property of the object -value . This method accesses properties of the represented property.
Subclassing
- - (void) setRepresentedObject: (id)object oldObservedKeyPath: (NSString *)oldObservedKeyPath newObservedKeyPath: (NSString *)newObservedKeyPath
- Description forthcoming.