Your outlets WILL NOT be nil during awakeFromNib. If you see this, file a bug.
If you have a NSController in entity mode (using Core Data), the fetch does not happen immediately, but in the next event. So what you will always see in your awakeFromNib is
- (void)awakeFromNib {
if (controller == nil) {
NSLog(@"check your connections in IB or file a bug");
} else {
if ([[controller arrangedObjects] count] == 0) {
NSLog(@"arraycontroller count is 0, this is normal");
}
}
}
I am an advocate of Grayson's approach - add yourself as an observer of the arrangedObjects in awakeFromNib.
by Ronzilla — Nov 02
If you have a NSController in entity mode (using Core Data), the fetch does not happen immediately, but in the next event. So what you will always see in your awakeFromNib is
- (void)awakeFromNib {
if (controller == nil) {
NSLog(@"check your connections in IB or file a bug");
} else {
if ([[controller arrangedObjects] count] == 0) {
NSLog(@"arraycontroller count is 0, this is normal");
}
}
}
I am an advocate of Grayson's approach - add yourself as an observer of the arrangedObjects in awakeFromNib.