Documentation

ETMutableObjectViewpoint class documentation

ETMutableObjectViewpoint : NSObject <ETPropertyViewpoint>

A proxy giving access to a model property as a mutable object.

AuthorsGenerated by qmathe
Declared inETMutableObjectViewpoint.h

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

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

      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

        - (id) representedObject

        The object to which the property belongs to.

          - (void) setRepresentedObject: (id)representedObject

          The object to which the property belongs to.

            - (BOOL) usesKeyValueCodingForAccessingValueProperties
            Description forthcoming.
              - (void) setUsesKeyValueCodingForAccessingValueProperties: (BOOL)usesKeyValueCodingForAccessingValueProperties
              Description forthcoming.

                Reading and Writing the value

                - (id) value

                The object value of the represented property.

                  - (void) setValue: (id)value

                  The object value of the represented property.

                    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

                        - (NSString *) observedKeyPath
                        Description forthcoming.
                          - (void) setRepresentedObject: (id)object oldObservedKeyPath: (NSString *)oldObservedKeyPath newObservedKeyPath: (NSString *)newObservedKeyPath
                          Description forthcoming.
                            - (void) startObserveRepresentedObject: (id)anObject forKeyPath: (NSString *)aKeyPath
                            Description forthcoming.
                              - (void) stopObserveRepresentedObject: (id)anObject forKeyPath: (NSString *)aKeyPath
                              Description forthcoming.