Fixed: CPObjectController -setContent potentially called too early

Previously setContent: was called first, before the rest of the object was initialized. This potentially could have unexpected results because setContent has many side effects.

This commit waits until the object is completely initialized before calling setContent.
This commit is contained in:
Aparajita Fishman
2013-02-25 21:22:45 -05:00
parent 6a8cba521b
commit fc9001353f
+2 -1
View File
@@ -106,12 +106,13 @@
{
if (self = [super init])
{
[self setContent:aContent];
[self setEditable:YES];
[self setObjectClass:[CPMutableDictionary class]];
_observedKeys = [[CPCountedSet alloc] init];
_selection = [[CPControllerSelectionProxy alloc] initWithController:self];
[self setContent:aContent];
}
return self;