>> So I guess my question is, how do I make sure my view is able to
>> receive the data I want sent to it before it is ever displayed. I hope
>> that makes sense.
>
>
> Put the initialization in the -awakeFromNib method of that view.
>
I moved the view swapping setup from the init to the awakeFromNib of
the app controller, but it didn't make a difference. I have this in
the awakeFromNib of my app controller.
- (void) awakeFromNib
{
// …
DetailsViewController *dvc;
dvc = [[ProgressViewController alloc] initWithController:self];
[dvc setManagedObjectContext:[self managedObjectContext]];
[detailViewControllers addObject:dvc];
[dvc release];
dvc = [[ProgressRunViewController alloc] initWithController:self];
[dvc setManagedObjectContext:[self managedObjectContext]];
[detailViewControllers addObject:dvc];
[dvc release];
dvc = [[DataDetailsViewController alloc] initWithController:self];
[dvc setManagedObjectContext:[self managedObjectContext]];
[detailViewControllers addObject:dvc];
[dvc release];
//...
}
And this is the init of each of the Controllers setup in the
awakeFromNib in the app controller, with of course a different nib
name.
- (id) init
{
self = [super initWithNibName:@"DataDetailsView" bundle:nil];
if (!self) {
return nil;
}
return self;
}
- (id) initWithController:(AppController *) controller
{
[self init];
if (!self) {
return nil;
}
appController = controller;
return self;
}
Did I not understand your response correctly?
_______________________________________________
Cocoa-dev mailing list ([email protected])
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com
This email sent to [email protected]