Public Member Functions | |
(void) | - awakeFromCib [implementation] |
(CPArray) | - blendThemeObjectTemplates [implementation] |
(id) | - mutableArrayValueForKey: [implementation] |
(id) | - mutableArrayValueForKeyPath: [implementation] |
(id) | - awakeAfterUsingCoder: [implementation] |
(id) | - valueForKey: [implementation] |
(id) | - valueForKeyPath: [implementation] |
(CPDictionary) | - dictionaryWithValuesForKeys: [implementation] |
(id) | - valueForUndefinedKey: [implementation] |
(void) | - setValue:forKeyPath: [implementation] |
(void) | - setValue:forKey: [implementation] |
(void) | - setValue:forUndefinedKey: [implementation] |
(void) | - willChangeValueForKey: [implementation] |
(void) | - didChangeValueForKey: [implementation] |
(void) | - willChange:valuesAtIndexes:forKey: [implementation] |
(void) | - didChange:valuesAtIndexes:forKey: [implementation] |
(void) | - addObserver:forKeyPath:options:context: [implementation] |
(void) | - removeObserver:forKeyPath: [implementation] |
Static Public Member Functions | |
(BOOL) | + accessInstanceVariablesDirectly [implementation] |
(BOOL) | + automaticallyNotifiesObserversForKey: [implementation] |
(CPSet) | + keyPathsForValuesAffectingValueForKey: [implementation] |
CPObject provides facilities for class allocation and initialization, querying runtime about parent classes and available selectors, using KVC (key-value coding).
When you subclass CPObject, most of the time you override one selector - init. It is called for default initialization of custom object. You must call parent class init in your overriden code:
- (id)init { self = [super init]; if(self) { ... provide default initialization code for your object ... } return self; }
One more useful thing to override is description(). This selector is used to provide developer-readable information about object. description selector is often used with CPLog debugging:
- (CPString)description { return [CPString stringWithFormat:@"<SomeClass %d>", someValue]; }To get description value you can use %@ specifier everywhere where format specifiers are allowed:
var inst = [[SomeClass alloc] initWithSomeValue:10]; CPLog(@"Got some class: %@", inst);would output:
Got some class: <SomeClass 10>
Definition at line 32 of file CPCibLoading.j.
+ (BOOL) accessInstanceVariablesDirectly | [implementation] |
Definition at line 37 of file CPKeyValueCoding.j.
- (void) addObserver: | (id) | anObserver | ||
forKeyPath: | (CPString) | aPath | ||
options: | (unsigned) | options | ||
context: | (id) | aContext | ||
[implementation] |
Definition at line 48 of file CPKeyValueObserving.j.
+ (BOOL) automaticallyNotifiesObserversForKey: | (CPString) | aKey | [implementation] |
Definition at line 64 of file CPKeyValueObserving.j.
- (id) awakeAfterUsingCoder: | (CPCoder) | aDecoder | [implementation] |
- (void) awakeFromCib | [implementation] |
Definition at line 34 of file CPCibLoading.j.
- (CPDictionary) dictionaryWithValuesForKeys: | (CPArray) | keys | [implementation] |
Definition at line 189 of file CPKeyValueCoding.j.
- (void) didChange: | (CPKeyValueChange) | change | ||
valuesAtIndexes: | (CPIndexSet) | indexes | ||
forKey: | (CPString) | key | ||
[implementation] |
Definition at line 44 of file CPKeyValueObserving.j.
- (void) didChangeValueForKey: | (CPString) | aKey | [implementation] |
Definition at line 36 of file CPKeyValueObserving.j.
Definition at line 69 of file CPKeyValueObserving.j.
- (id) mutableArrayValueForKey: | (id) | aKey | [implementation] |
Definition at line 27 of file CPArray+KVO.j.
- (id) mutableArrayValueForKeyPath: | (id) | aKeyPath | [implementation] |
Definition at line 32 of file CPArray+KVO.j.
- (void) removeObserver: | (id) | anObserver | ||
forKeyPath: | (CPString) | aPath | ||
[implementation] |
Definition at line 56 of file CPKeyValueObserving.j.
- (void) setValue: | (id) | aValue | ||
forKey: | (CPString) | aKey | ||
[implementation] |
Definition at line 231 of file CPKeyValueCoding.j.
- (void) setValue: | (id) | aValue | ||
forKeyPath: | (CPString) | aKeyPath | ||
[implementation] |
Definition at line 216 of file CPKeyValueCoding.j.
- (void) setValue: | (id) | aValue | ||
forUndefinedKey: | (CPString) | aKey | ||
[implementation] |
Definition at line 258 of file CPKeyValueCoding.j.
- (id) valueForKey: | (CPString) | aKey | [implementation] |
Definition at line 155 of file CPKeyValueCoding.j.
- (id) valueForKeyPath: | (CPString) | aKeyPath | [implementation] |
Definition at line 174 of file CPKeyValueCoding.j.
- (id) valueForUndefinedKey: | (CPString) | aKey | [implementation] |
Definition at line 209 of file CPKeyValueCoding.j.
- (void) willChange: | (CPKeyValueChange) | change | ||
valuesAtIndexes: | (CPIndexSet) | indexes | ||
forKey: | (CPString) | key | ||
[implementation] |
Definition at line 40 of file CPKeyValueObserving.j.
- (void) willChangeValueForKey: | (CPString) | aKey | [implementation] |
Definition at line 32 of file CPKeyValueObserving.j.