Re: Obtaining a reference to an entity's context's owner
Re: Obtaining a reference to an entity's context's owner
- Subject: Re: Obtaining a reference to an entity's context's owner
- From: SA Dev <email@hidden>
- Date: Thu, 5 May 2005 14:07:27 -0400
I think we're crossing wires somewhere here. :-D
I asked if the Keyword class should do all the work (ie, find all
Page instances whose content string contains the modified Keyword's
word string, then flag it as needing sync). You said yes, but the
rest of your answer indicates a resounding no. ;-)
Okay, let's back up a bit. Right now, my Keyword class 'wants' to
tell the MyDocument class to -touchPagesContainingKeyword:self ...
this method cycles through all the Pages, accesses their content
property and does a basic string search for the modified Keyword's
"word" string. If the Page content contains the keyword, its "-touch"
method is called (which modifies a few properties including mod date,
and needsSync flag.
I'm beginning to question this approach. I'm not talking about
using a fetch request but maybe I should be. Is this where my problem
lies?
On May 5, 2005, at 1:56 PM, mmalcolm crawford wrote:
It does make me think, though - should the Keyword class itself do
all the work here, rather than ask the document to do it? That
*should* negate the need to talk directly with the document itself
altogether. Is that the right direction?
Yes. As a controller, it's aware of when modifications are being
made and is able to coordinate responses to changes. It's not up
to the Keyword to act as a controller in that way.
_______________________________________________
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