Re: Listening to bindings
Re: Listening to bindings
- Subject: Re: Listening to bindings
- From: Scott Stevenson <email@hidden>
- Date: Fri, 18 Feb 2005 15:31:20 -0800
On Feb 18, 2005, at 8:00 AM, Guy English wrote:
My question would be ... why? Is there some reason your model objects
can't manage this themselves? You know when one of your models gets
created ( init ) you know when it gets deleted ( dealloc ) and you
know when it's state changes ( through accessors ). Why do you want a
third party sticking it's nose in there? The only thing I can think of
is that you're using NSDictionaries instead of actual model classes -
if you are: don't. :)
A follow-up to my last email...
I don't believe -init/-dealloc are good places to manage database
updates. Not only are there all sorts of a reasons (other than
deletion) that an object may be deallocated, but you could easily have
a situation where an object is removed from an array but not deleted. I
also think data objects generally shouldn't speak directly to a
database, but rather notify a delegate about changes via KVO.
I really think you should observe changes to the source array in order
to know when things should be deleted or inserted in the db.
- Scott
--
http://treehouseideas.com/
http://theocacao.com/ [blog]
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden