Re: Regarding MVC design pattern
Re: Regarding MVC design pattern
- Subject: Re: Regarding MVC design pattern
- From: Joanna Carter <email@hidden>
- Date: Tue, 18 May 2010 12:00:38 +0100
Hi Sal
> However, I declare a NSDictionary instance variable in my model object. This
> NSDictionary instance
> store some data I need. And I will create this NSDictionary instance by
> invoking:
> [NSDictionary dictionaryWithObjects:names forKeys:keys]
> Both names and keys are string NSArray. I will invoke this method inside my
> init method of my model
> object.
And this is where your problem could well be. If you create anything in the init method, and it references the Nib, then the connections won't be correctly made.
Try moving your dictionary creation code to the awakeFromNib method. This is called after the Nib is fully loaded.
Joanna
--
Joanna Carter
Carter Consulting
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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:
This email sent to email@hidden