Theocacao
Leopard
Design Element
Comment on "Using Delayed Messages in Cocoa"
by Ronzilla — Nov 02
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.
Back to "Using Delayed Messages in Cocoa"
Design Element

Copyright © Scott Stevenson 2004-2015