From fc9001353fcfde9d21a4595d8c65f5aab1bd2f4e Mon Sep 17 00:00:00 2001 From: Aparajita Fishman Date: Mon, 25 Feb 2013 21:22:45 -0500 Subject: [PATCH] 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. --- AppKit/CPObjectController.j | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/AppKit/CPObjectController.j b/AppKit/CPObjectController.j index 178262da4..497d35aed 100644 --- a/AppKit/CPObjectController.j +++ b/AppKit/CPObjectController.j @@ -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;