#import <CPObjectController.h>
Class Methods | |
(BOOL) | + automaticallyNotifiesObserversForKey: |
(void) | + initialize |
(CPSet) | + keyPathsForValuesAffectingCanAdd |
(CPSet) | + keyPathsForValuesAffectingCanInsert |
(CPSet) | + keyPathsForValuesAffectingCanRemove |
(CPSet) | + keyPathsForValuesAffectingContentObject |
CPObjectController is a bindings-compatible controller class. Properties of the content object of an object of this class can be bound to user interface elements to change and access their values.
The content of an CPObjectController instance is an CPMutableDictionary object by default. This allows a single CPObjectController instance to be used to manage several properties accessed by key value paths. The default content object class can be changed by calling setObjectClass:, which a subclass must override.
Definition at line 2 of file CPObjectController.h.
|
implementation |
Creates and adds a sets the object as the controller's content.
id | aSender - The sender of the message. |
Reimplemented in CPArrayController.
Definition at line 249 of file CPObjectController.j.
|
implementation |
Sets the controller's content object.
id | anObject - The object to set for the controller. |
Reimplemented in CPArrayController.
Definition at line 224 of file CPObjectController.j.
|
implementation |
Reimplemented from CPObject.
Definition at line 343 of file CPObjectController.j.
|
implementation |
Whether -willChangeValueForKey/-didChangeValueForKey should automatically be invoked when the setter of the given key is used. The default is YES. If you override this method to return NO for some key, you will need to call -willChangeValueForKey/-didChangeValueForKey manually to be KVO compliant.
The default implementation of this method will check if the receiving class implements + (BOOL)automaticallyNotifiesObserversOf<aKey>
and return the response of that method if it exists.
Reimplemented from CPObject.
Definition at line 62 of file CPObjectController.j.
|
implementation |
Returns if the controller prepares the content automatically.
Definition at line 171 of file CPObjectController.j.
|
implementation |
Reimplemented from CPObject.
Reimplemented in CPArrayController.
Provided by category CPObjectController(CPCoding).
Definition at line 397 of file CPObjectController.j.
|
implementation |
Definition at line 258 of file CPObjectController.j.
|
implementation |
Definition at line 276 of file CPObjectController.j.
|
implementation |
Returns the controller's content object.
Definition at line 119 of file CPObjectController.j.
|
implementation |
Reimplemented from CPController.
Reimplemented in CPArrayController, and CPDictionaryController.
Provided by category CPObjectController(CPCoding).
Definition at line 384 of file CPObjectController.j.
|
implementation |
Reimplemented from CPController.
Reimplemented in CPArrayController, and CPDictionaryController.
Definition at line 88 of file CPObjectController.j.
|
implementation |
Reimplemented from CPObject.
Reimplemented in CPArrayController.
Definition at line 48 of file CPObjectController.j.
|
implementation |
Reimplemented from CPController.
Reimplemented in CPArrayController, and CPDictionaryController.
Provided by category CPObjectController(CPCoding).
Definition at line 364 of file CPObjectController.j.
|
implementation |
Inits and returns a CPObjectController object with the given content.
id | aContent - The object the controller will use. |
Definition at line 99 of file CPObjectController.j.
|
implementation |
Definition at line 293 of file CPObjectController.j.
|
implementation |
Definition at line 70 of file CPObjectController.j.
|
implementation |
Definition at line 75 of file CPObjectController.j.
|
implementation |
Reimplemented in CPArrayController.
Definition at line 80 of file CPObjectController.j.
|
implementation |
Definition at line 57 of file CPObjectController.j.
|
implementation |
Creates and returns a new object of the appropriate class.
Reimplemented in CPDictionaryController.
Definition at line 215 of file CPObjectController.j.
|
implementation |
Returns the class of what new objects will be when they are created.
Definition at line 198 of file CPObjectController.j.
|
implementation |
Definition at line 338 of file CPObjectController.j.
|
implementation |
Overridden by a subclass that require control over the creation of new objects.
Reimplemented in CPArrayController.
Definition at line 179 of file CPObjectController.j.
|
implementation |
Removes the content object from the controller.
id | aSender - The sender of the message. |
Reimplemented in CPArrayController.
Definition at line 267 of file CPObjectController.j.
|
implementation |
Removes a given object from the controller.
id | anObject - The object to remove from the receiver. |
Reimplemented in CPArrayController.
Definition at line 236 of file CPObjectController.j.
|
implementation |
Reimplemented from CPObject.
Definition at line 349 of file CPObjectController.j.
|
implementation |
Reimplemented in CPArrayController.
Definition at line 301 of file CPObjectController.j.
|
implementation |
Returns a proxy object representing the controller's selection.
Definition at line 309 of file CPObjectController.j.
|
implementation |
Sets whether the controller automatically creates and inserts new content objects automatically when loading from a cib file. If you pass YES and the controller uses prepareContent to create the content object. The default is NO.
BOOL | shouldAutomaticallyPrepareContent - YES if the content should be prepared, otherwise NO. |
Definition at line 162 of file CPObjectController.j.
|
implementation |
Sets the content object for the controller.
id | aContent - The new content object for the controller. |
Reimplemented in CPArrayController.
Definition at line 128 of file CPObjectController.j.
|
implementation |
Sets whether the controller allows for the editing of the content.
BOOL | shouldBeEditable - YES if the content should be editable, otherwise NO. |
Definition at line 285 of file CPObjectController.j.
|
implementation |
Sets the object class when creating new objects.
Class | - the class of new objects that will be created. |
Definition at line 188 of file CPObjectController.j.