Re: An object should not retain its delegate, but what about its data source ?
Re: An object should not retain its delegate, but what about its data source ?
- Subject: Re: An object should not retain its delegate, but what about its data source ?
- From: Bill Cheeseman <email@hidden>
- Date: Tue, 31 Jul 2007 20:06:10 -0400
- Thread-topic: An object should not retain its delegate, but what about its data source ?
on 2007-07-31 7:48 PM, mmalc crawford at email@hidden wrote:
> On Jul 31, 2007, at 2:27 PM, Erik Buck wrote:
>
>> What is the net wisdom on the subject ?
>>
> <http://developer.apple.com/documentation/Cocoa/Conceptual/CocoaFundamentals/C
> ommunicatingWithObjects/chapter_6_section_4.html
>>
> (Yes, it is a bit tucked away -- I just happened to read something
> else this morning that referenced it.)
There is still one aspect of data sources that the documentation doesn't
explain very well. Most people think of the term "data source" as meaning
the place where the data itself is stored. However, the documentation tends
to be more precise, referring to the data source as the object that
implements the required data source methods. The data itself can be located
anywhere -- in another object, or even on another disk or another computer
-- as long as the data source methods know how to get at it.
So when Erik asks whether the "data source" should be retained, I don't know
whether he is asking about the data, or about the object that contains the
required data source methods. They are often the same object, but not
always. The documentation mmalc references is careful to talk about
retaining the "data," not the "data source." I assume that's deliberate, and
correct.
--
Bill Cheeseman - email@hidden
Quechee Software, Quechee, Vermont, USA
www.quecheesoftware.com
PreFab Software - www.prefabsoftware.com
_______________________________________________
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