API 0.9.5
CPObjectController Class Reference

#import <CPObjectController.h>

Inheritance diagram for CPObjectController:

List of all members.

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:

Class Methods

(BOOL) + automaticallyNotifiesObserversForKey:
(id) + 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

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 245 of file CPObjectController.j.

- (void) addObject: (id)  anObject

Sets the controller's content object.

Parameters:
idanObject - The object to set for the controller.

Reimplemented in CPArrayController.

Definition at line 220 of file CPObjectController.j.

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

Definition at line 339 of file CPObjectController.j.

+ (BOOL) automaticallyNotifiesObserversForKey: (CPString aKey

Reimplemented from CPObject.

Definition at line 60 of file CPObjectController.j.

- (BOOL) automaticallyPreparesContent

Returns if the controller prepares the content automatically.

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

Definition at line 167 of file CPObjectController.j.

- (void) awakeFromCib

Reimplemented from CPObject.

Reimplemented in CPArrayController.

Definition at line 393 of file CPObjectController.j.

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

Definition at line 254 of file CPObjectController.j.

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

Definition at line 272 of file CPObjectController.j.

- (id) content

Returns the controller's content object.

Returns:
id - The content object of the controller.

Definition at line 115 of file CPObjectController.j.

- (void) encodeWithCoder: (CPCoder aCoder

Reimplemented from CPController.

Reimplemented in CPArrayController.

Definition at line 380 of file CPObjectController.j.

- (id) init

Reimplemented from CPController.

Reimplemented in CPArrayController.

Definition at line 86 of file CPObjectController.j.

+ (id) initialize

Reimplemented in CPArrayController.

Definition at line 49 of file CPObjectController.j.

- (id) initWithCoder: (CPCoder aCoder

Reimplemented from CPController.

Reimplemented in CPArrayController.

Definition at line 360 of file CPObjectController.j.

- (id) initWithContent: (id)  aContent

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 97 of file CPObjectController.j.

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

Definition at line 289 of file CPObjectController.j.

+ (CPSet) keyPathsForValuesAffectingCanAdd

Definition at line 68 of file CPObjectController.j.

+ (CPSet) keyPathsForValuesAffectingCanInsert

Definition at line 73 of file CPObjectController.j.

+ (CPSet) keyPathsForValuesAffectingCanRemove

Reimplemented in CPArrayController.

Definition at line 78 of file CPObjectController.j.

+ (CPSet) keyPathsForValuesAffectingContentObject

Definition at line 55 of file CPObjectController.j.

- (id) newObject

Creates and returns a new object of the appropriate class.

Returns:
id - The object created.

Definition at line 211 of file CPObjectController.j.

- (Class) objectClass

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

Returns:
Class - The class of new objects.

Definition at line 194 of file CPObjectController.j.

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

Definition at line 334 of file CPObjectController.j.

- (void) prepareContent

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

Reimplemented in CPArrayController.

Definition at line 175 of file CPObjectController.j.

- (void) remove: (id)  aSender

Removes the content object from the controller.

Parameters:
idaSender - The sender of the message.

Reimplemented in CPArrayController.

Definition at line 263 of file CPObjectController.j.

- (void) removeObject: (id)  anObject

Removes a given object from the controller.

Parameters:
idanObject - The object to remove from the receiver.

Reimplemented in CPArrayController.

Definition at line 232 of file CPObjectController.j.

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

Reimplemented from CPObject.

Definition at line 345 of file CPObjectController.j.

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

Reimplemented in CPArrayController.

Definition at line 297 of file CPObjectController.j.

- (id) selection

Returns a proxy object representing the controller's selection.

Definition at line 305 of file CPObjectController.j.

- (void) setAutomaticallyPreparesContent: (BOOL)  shouldAutomaticallyPrepareContent

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 158 of file CPObjectController.j.

- (void) setContent: (id)  aContent

Sets the content object for the controller.

Parameters:
idaContent - The new content object for the controller.

Reimplemented in CPArrayController.

Definition at line 124 of file CPObjectController.j.

- (void) setEditable: (BOOL)  shouldBeEditable

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 281 of file CPObjectController.j.

- (void) setObjectClass: (Class)  aClass

Sets the object class when creating new objects.

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

Definition at line 184 of file CPObjectController.j.


The documentation for this class was generated from the following files:
 All Classes Files Functions Variables Defines