ETMutableObjectViewpoint class documentation

Authors

Quentin Mathe (quentin.mathe@gmail.com)

Copyright: (C) 2013 Quentin Mathe

Software documentation for the ETMutableObjectViewpoint class

ETMutableObjectViewpoint : NSObject

Declared in:
ETMutableObjectViewpoint.h
Conforms to:
ETPropertyViewpoint

@group Viewpoints @abstract A proxy giving access to a model property as a mutable object.

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.


Instance Variables

Method summary

viewpointWithName: representedObject: 

+ (id) viewpointWithName: (NSString*)key representedObject: (id)object;

@taskunit Initialization


initWithName: representedObject: 

- (id) initWithName: (NSString*)key representedObject: (id)object;
Description forthcoming.

setRepresentedObject: oldObservedKeyPath: newObservedKeyPath: 

- (void) setRepresentedObject: (id)object oldObservedKeyPath: (NSString*)oldObservedKeyPath newObservedKeyPath: (NSString*)newObservedKeyPath;
Description forthcoming.

setValue: forProperty: 

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


startObserveRepresentedObject: forKeyPath: 

- (void) startObserveRepresentedObject: (id)anObject forKeyPath: (NSString*)aKeyPath;
Description forthcoming.

stopObserveRepresentedObject: forKeyPath: 

- (void) stopObserveRepresentedObject: (id)anObject forKeyPath: (NSString*)aKeyPath;
Description forthcoming.

valueForProperty: 

- (id) valueForProperty: (NSString*)key;

@taskunit Property Value Coding

Returns a value bound to a property of the object -value . This method accesses properties of the represented property.




Instance Variables for ETMutableObjectViewpoint Class

_isSettingValue

@protected BOOL _isSettingValue;
Warning the underscore at the start of the name of this instance variable indicates that, even though it is not technically private, it is intended for internal use within the package, and you should not use the variable in other code.