Re: Core Data with NSArrayController Confusion
Re: Core Data with NSArrayController Confusion
- Subject: Re: Core Data with NSArrayController Confusion
- From: "I. Savant" <email@hidden>
- Date: Tue, 8 Apr 2008 15:18:25 -0400
On Tue, Apr 8, 2008 at 2:45 PM, Michael Burns <email@hidden> wrote:
> My only question with that is that I will need to fetch all existing cells,
> and I as I understood it this was something that was not to be done in
> awakeFromInsert. Is that something I dreamed up?
If that's a rule somewhere, it's a silly one. There as many
legitimate reasons to do this, it's mind-boggling.
In situations such as yours, the only other way is to put 'business
logic' in the controller layer which is bad design - BAD, BAD DESIGN!
- since business logic belongs in the model. Your model layer should
be able to keep itself from being placed into an inconsistent state
when an item is added and your controller should be completely
ignorant about the details.
Just remember that when creating your new Cell instance, "self" in
-awakeFromInsert will be among those fetched since it's just been
inserted ...
--
I.S.
_______________________________________________
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