API  0.9.7
 All Classes Files Functions Variables Macros Groups Pages
CPObjectController Class Reference

#import <CPObjectController.h>

+ Inheritance diagram for CPObjectController:

Instance Methods

(void) - add:
 
(void) - addObject:
 
(void) - addObserver:forKeyPath:options:context:
 
(BOOL) - automaticallyPreparesContent
 
(void) - awakeFromCib
 
(BOOL) - canAdd
 
(BOOL) - canRemove
 
(id) - content
 
(void) - encodeWithCoder:
 
(id) - init
 
(id) - initWithCoder:
 
(id) - initWithContent:
 
(BOOL) - isEditable
 
(id) - newObject
 
(Class) - objectClass
 
(id) - observedKeys
 
(void) - prepareContent
 
(void) - remove:
 
(void) - removeObject:
 
(void) - removeObserver:forKeyPath:
 
(CPArray) - selectedObjects
 
(id) - selection
 
(void) - setAutomaticallyPreparesContent:
 
(void) - setContent:
 
(void) - setEditable:
 
(void) - setObjectClass:
 
- Instance Methods inherited from CPController
(BOOL) - commitEditing
 
(void) - discardEditing
 
(BOOL) - isEditing
 
(void) - objectDidBeginEditing:
 
(void) - objectDidEndEditing:
 

Class Methods

(BOOL) + automaticallyNotifiesObserversForKey:
 
(void) + initialize
 
(CPSet) + keyPathsForValuesAffectingCanAdd
 
(CPSet) + keyPathsForValuesAffectingCanInsert
 
(CPSet) + keyPathsForValuesAffectingCanRemove
 
(CPSet) + keyPathsForValuesAffectingContentObject
 

Detailed Description

Definition at line 2 of file CPObjectController.h.

Method Documentation

- (void) add: (id)  aSender
implementation

Creates and adds a sets the object as the controller's content.

Parameters
idaSender - The sender of the message.

Reimplemented in CPArrayController.

Definition at line 250 of file CPObjectController.j.

- (void) addObject: (id)  anObject
implementation

Sets the controller's content object.

Parameters
idanObject - The object to set for the controller.

Reimplemented in CPArrayController.

Definition at line 225 of file CPObjectController.j.

- (void) addObserver: (id)  anObserver
forKeyPath: (CPString aKeyPath
options: (CPKeyValueObservingOptions)  options
context: (id)  context 
implementation

Definition at line 344 of file CPObjectController.j.

+ (BOOL) automaticallyNotifiesObserversForKey: (CPString aKey
implementation

Definition at line 63 of file CPObjectController.j.

- (BOOL) automaticallyPreparesContent
implementation

Returns if the controller prepares the content automatically.

Returns
BOOL - YES if the content is prepared, otherwise NO.

Definition at line 172 of file CPObjectController.j.

- (void) awakeFromCib
implementation

Reimplemented in CPArrayController.

Provided by category CPObjectController(CPCoding).

Definition at line 398 of file CPObjectController.j.

- (BOOL) canAdd
implementation
Returns
BOOL - YES if you can added to the controller using add:

Definition at line 259 of file CPObjectController.j.

- (BOOL) canRemove
implementation
Returns
BOOL - Returns YES if you can remove the controller's content using remove:

Definition at line 277 of file CPObjectController.j.

- (id) content
implementation

Returns the controller's content object.

Returns
id - The content object of the controller.

Definition at line 120 of file CPObjectController.j.

- (void) encodeWithCoder: (CPCoder aCoder
implementation

Reimplemented from CPController.

Reimplemented in CPArrayController, and CPDictionaryController.

Provided by category CPObjectController(CPCoding).

Definition at line 385 of file CPObjectController.j.

- (id) init
implementation

Reimplemented from CPController.

Reimplemented in CPArrayController, and CPDictionaryController.

Definition at line 89 of file CPObjectController.j.

+ (void) initialize
implementation

Reimplemented in CPArrayController.

Definition at line 49 of file CPObjectController.j.

- (id) initWithCoder: (CPCoder aCoder
implementation

Reimplemented from CPController.

Reimplemented in CPArrayController, and CPDictionaryController.

Provided by category CPObjectController(CPCoding).

Definition at line 365 of file CPObjectController.j.

- (id) initWithContent: (id)  aContent
implementation

Inits and returns a CPObjectController object with the given content.

Parameters
idaContent - The object the controller will use.
Returns
id the CPObjectConroller instance.

Definition at line 100 of file CPObjectController.j.

- (BOOL) isEditable
implementation
Returns
BOOL - Returns YES if the content of the controller is editable, otherwise NO.

Definition at line 294 of file CPObjectController.j.

+ (CPSet) keyPathsForValuesAffectingCanAdd
implementation

Definition at line 71 of file CPObjectController.j.

+ (CPSet) keyPathsForValuesAffectingCanInsert
implementation

Definition at line 76 of file CPObjectController.j.

+ (CPSet) keyPathsForValuesAffectingCanRemove
implementation

Reimplemented in CPArrayController.

Definition at line 81 of file CPObjectController.j.

+ (CPSet) keyPathsForValuesAffectingContentObject
implementation

Definition at line 58 of file CPObjectController.j.

- (id) newObject
implementation

Creates and returns a new object of the appropriate class.

Returns
id - The object created.

Reimplemented in CPDictionaryController.

Definition at line 216 of file CPObjectController.j.

- (Class) objectClass
implementation

Returns the class of what new objects will be when they are created.

Returns
Class - The class of new objects.

Definition at line 199 of file CPObjectController.j.

- (id) observedKeys
implementation
Returns
id - Returns the keys which are being observed.

Definition at line 339 of file CPObjectController.j.

- (void) prepareContent
implementation

Overridden by a subclass that require control over the creation of new objects.

Reimplemented in CPArrayController.

Definition at line 180 of file CPObjectController.j.

- (void) remove: (id)  aSender
implementation

Removes the content object from the controller.

Parameters
idaSender - The sender of the message.

Reimplemented in CPArrayController.

Definition at line 268 of file CPObjectController.j.

- (void) removeObject: (id)  anObject
implementation

Removes a given object from the controller.

Parameters
idanObject - The object to remove from the receiver.

Reimplemented in CPArrayController.

Definition at line 237 of file CPObjectController.j.

- (void) removeObserver: (id)  anObserver
forKeyPath: (CPString aKeyPath 
implementation

Definition at line 350 of file CPObjectController.j.

- (CPArray) selectedObjects
implementation
Returns
CPArray - Returns an array of all objects to be affected by editing.

Reimplemented in CPArrayController.

Definition at line 302 of file CPObjectController.j.

- (id) selection
implementation

Returns a proxy object representing the controller's selection.

Definition at line 310 of file CPObjectController.j.

- (void) setAutomaticallyPreparesContent: (BOOL)  shouldAutomaticallyPrepareContent
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.

Parameters
BOOLshouldAutomaticallyPrepareContent - YES if the content should be prepared, otherwise NO.

Definition at line 163 of file CPObjectController.j.

- (void) setContent: (id)  aContent
implementation

Sets the content object for the controller.

Parameters
idaContent - The new content object for the controller.

Reimplemented in CPArrayController.

Definition at line 129 of file CPObjectController.j.

- (void) setEditable: (BOOL)  shouldBeEditable
implementation

Sets whether the controller allows for the editing of the content.

Parameters
BOOLshouldBeEditable - YES if the content should be editable, otherwise NO.

Definition at line 286 of file CPObjectController.j.

- (void) setObjectClass: (Class)  aClass
implementation

Sets the object class when creating new objects.

Parameters
Class- the class of new objects that will be created.

Definition at line 189 of file CPObjectController.j.


The documentation for this class was generated from the following files: