• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Regarding MVC design pattern
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

References: 
 >Regarding MVC design pattern (From: Sai <email@hidden>)
 >Re: Regarding MVC design pattern (From: Henry McGilton <email@hidden>)
 >Re: Regarding MVC design pattern (From: Sai <email@hidden>)

  • Prev by Date: Re: baseURL problem with +fileURLWithPath:
  • Next by Date: Re: Specify "Sent Action on" Behavior of NSTextField
  • Previous by thread: Re: Regarding MVC design pattern
  • Next by thread: Re: Regarding MVC design pattern
  • Index(es):
    • Date
    • Thread